0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

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)
This commit is contained in:
Patrick H. Lauke 2017-04-20 14:08:40 +01:00 committed by GitHub
parent ef099ad05d
commit 1f37c536b2

View File

@ -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()
@ -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')