Skip to content

Commit

Permalink
fix(drop-down): dont swallow keyDown events unless its esc and open (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo authored Jun 19, 2024
1 parent 266b783 commit bdb8eff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/button/src/dropdown-button/dropdown-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class DropdownButton extends Component {
}

handleKeyDown = (event) => {
event.preventDefault()
if (event.key === 'Escape' && this.state.open) {
event.preventDefault()
event.stopPropagation()
this.setState({ open: false })
}
Expand Down

0 comments on commit bdb8eff

Please sign in to comment.