Skip to content

Commit

Permalink
Prevent Esc from dropdown from propagating
Browse files Browse the repository at this point in the history
solves issues where a dropdown inside a modal, when dismissed with `Esc`, also results in the parent modal itself being closed
  • Loading branch information
patrickhlauke committed Jan 10, 2021
1 parent a2ae2c3 commit 11084e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/src/dropdown.js
Expand Up @@ -447,6 +447,7 @@ class Dropdown extends BaseComponent {
const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]
button.focus()
Dropdown.clearMenus()
event.stopPropagation()
return
}

Expand Down

0 comments on commit 11084e6

Please sign in to comment.