mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Set the tabIndex on the input element
This commit reverts a portion of the changes introduced in
9eac520e6a. Prior to that commit, we were
setting the tabIndex to -1 on the atom-text-editor element. This commit
restores that behavior.
Instead of setting a custom tab index directly on the atom-text-editor
element, we instead set the tabIndex on the input element *inside* the
atom-text-editor element.
With these changes in place, you can successfully use the tabIndex to
define the tab order for atom-text-editor elements. 😅
This commit is contained in:
@@ -482,7 +482,7 @@ class TextEditorComponent {
|
||||
style,
|
||||
attributes,
|
||||
dataset,
|
||||
tabIndex: this.tabIndex,
|
||||
tabIndex: -1,
|
||||
on: {mousewheel: this.didMouseWheel}
|
||||
},
|
||||
$.div(
|
||||
@@ -682,7 +682,8 @@ class TextEditorComponent {
|
||||
scrollWidth: this.getScrollWidth(),
|
||||
decorationsToRender: this.decorationsToRender,
|
||||
cursorsBlinkedOff: this.cursorsBlinkedOff,
|
||||
hiddenInputPosition: this.hiddenInputPosition
|
||||
hiddenInputPosition: this.hiddenInputPosition,
|
||||
tabIndex: this.tabIndex
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3547,7 +3548,7 @@ class CursorsAndInputComponent {
|
||||
const {
|
||||
lineHeight, hiddenInputPosition, didBlurHiddenInput, didFocusHiddenInput,
|
||||
didPaste, didTextInput, didKeydown, didKeyup, didKeypress,
|
||||
didCompositionStart, didCompositionUpdate, didCompositionEnd
|
||||
didCompositionStart, didCompositionUpdate, didCompositionEnd, tabIndex
|
||||
} = this.props
|
||||
|
||||
let top, left
|
||||
@@ -3575,7 +3576,7 @@ class CursorsAndInputComponent {
|
||||
compositionupdate: didCompositionUpdate,
|
||||
compositionend: didCompositionEnd
|
||||
},
|
||||
tabIndex: this.tabIndex,
|
||||
tabIndex: tabIndex,
|
||||
style: {
|
||||
position: 'absolute',
|
||||
width: '1px',
|
||||
|
||||
Reference in New Issue
Block a user