Skip to content
Snippets Groups Projects
Commit c92de43d authored by Oswaldo Acauan's avatar Oswaldo Acauan
Browse files

Fix wrong behavior with ENTER/SPACE

parent 9b12853a
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,9 @@ export default class DropdownList extends Component {
const { activeItemIndex } = this.state;
if ([KEY_CODES.SPACE, KEY_CODES.ENTER].includes(event.which)) {
e.preventDefault();
e.stopPropagation();
return event.currentTarget.click();
}
......
......@@ -23,6 +23,9 @@ export default class DropdownTrigger extends Component {
const { dropdownShow, dropdownHide } = this.props;
if ([KEY_CODES.SPACE, KEY_CODES.ENTER].includes(event.which)) {
e.preventDefault();
e.stopPropagation();
return findDOMNode(this).click();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment