Skip to content

Commit a938eb7

Browse files
ifabbewcjordan
authored andcommitted
Remove tabIndex (schrodinger#347)
* Remove tabIndex * Set tab index if keyboardPageEnabled or keyboardScrollEnabled is true
1 parent 873ec92 commit a938eb7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/FixedDataTable.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -798,15 +798,18 @@ var FixedDataTable = createReactClass({
798798
style={{top: footOffsetTop}}
799799
/>;
800800
}
801-
801+
var tabIndex = null
802+
if (this.props.keyboardPageEnabled || this.props.keyboardScrollEnabled) {
803+
tabIndex = 0
804+
}
802805
return (
803806
<div
804807
className={joinClasses(
805808
this.state.className,
806809
cx('fixedDataTableLayout/main'),
807810
cx('public/fixedDataTable/main'),
808811
)}
809-
tabIndex={0}
812+
tabIndex={tabIndex}
810813
onKeyDown={this._onKeyDown}
811814
onWheel={this._wheelHandler.onWheel}
812815
onTouchStart={this._touchHandler.onTouchStart}

src/Scrollbar.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ var Scrollbar = createReactClass({
186186
onWheel={this._wheelHandler.onWheel}
187187
className={mainClassName}
188188
ref={this.rootRef}
189-
style={mainStyle}
190-
tabIndex={0}>
189+
style={mainStyle}>
191190
<div
192191
ref={this.faceRef}
193192
className={faceClassName}

0 commit comments

Comments
 (0)