Browse Source

Trigger Tabbable also with space

master
meriadec 7 years ago
parent
commit
68ef59136e
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 2
      src/components/base/Box/index.js

2
src/components/base/Box/index.js

@ -98,7 +98,7 @@ export class Tabbable extends PureComponent<any, TabbableState> {
handleBlur = () => this.setState({ isFocused: false })
handleKeydown = (e: SyntheticKeyboardEvent<any>) => {
if (e.which === 13 && this.state.isFocused && this.props.onClick) {
if ((e.which === 13 || e.which === 32) && this.state.isFocused && this.props.onClick) {
this.props.onClick(e)
}
}

Loading…
Cancel
Save