Commit 1f37c536 authored by Patrick H. Lauke's avatar Patrick H. Lauke Committed by GitHub
Browse files

Tweak iOS hack for dropdown

Tweak to https://github.com/twbs/bootstrap/pull/22426, where the wrong selector slipped through the net (selecting all of `<body>`s grand-children rather than children)
parent ef099ad0
Showing with 2 additions and 2 deletions
+2 -2
...@@ -111,7 +111,7 @@ const Dropdown = (($) => { ...@@ -111,7 +111,7 @@ const Dropdown = (($) => {
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && if ('ontouchstart' in document.documentElement &&
!$(parent).closest(Selector.NAVBAR_NAV).length) { !$(parent).closest(Selector.NAVBAR_NAV).length) {
$('body').children().on('mouseover', '*', $.noop) $('body').children().on('mouseover', null, $.noop)
} }
this.focus() this.focus()
...@@ -190,7 +190,7 @@ const Dropdown = (($) => { ...@@ -190,7 +190,7 @@ const Dropdown = (($) => {
// if this is a touch-enabled device we remove the extra // if this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
$('body').children().off('mouseover', '*', $.noop) $('body').children().off('mouseover', null, $.noop)
} }
toggles[i].setAttribute('aria-expanded', 'false') toggles[i].setAttribute('aria-expanded', 'false')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment