In T172694 we allowed Tab/Shift+Tab to run natively if indentation command are not available (e.g. in DiscussionTools). However relying on native tabIndexes means that the next focusable element is chosen, even it is within the surface. This leads to confusing or broken behaviour, e.g. if the next focusable is a link in a template, such as you get when you @-mention, focus is not moved at all. Or focus could be moved to the next image caption as that has contenteditable=true set explicitly.
We should instead move focus to the next focusable element outside of the surface, like you would expect a <textarea> to behave.
- Start a reply in visual mode
- @-mention another user
- Press tab
Expected:
Focus moves to the "Advanced" button
Observed:
Nothing happens