Skip to content

Commit

Permalink
Tweak iOS hack for dropdown
Browse files Browse the repository at this point in the history
Tweak to #22426, where the wrong selector slipped through the net (selecting all of `<body>`s grand-children rather than children)
  • Loading branch information
patrickhlauke authored Apr 20, 2017
1 parent ef099ad commit 1f37c53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const Dropdown = (($) => {
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement &&
!$(parent).closest(Selector.NAVBAR_NAV).length) {
$('body').children().on('mouseover', '*', $.noop)
$('body').children().on('mouseover', null, $.noop)
}

this.focus()
Expand Down Expand Up @@ -190,7 +190,7 @@ const Dropdown = (($) => {
// if this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$('body').children().off('mouseover', '*', $.noop)
$('body').children().off('mouseover', null, $.noop)
}

toggles[i].setAttribute('aria-expanded', 'false')
Expand Down

0 comments on commit 1f37c53

Please sign in to comment.