mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
Dropdown — Don't use event delegation
This commit is contained in:
parent
b2bc159d72
commit
5f946d3a86
@ -192,7 +192,7 @@ class Dropdown extends BaseComponent {
|
||||
if ('ontouchstart' in document.documentElement &&
|
||||
!parent.closest(SELECTOR_NAVBAR_NAV)) {
|
||||
[].concat(...document.body.children)
|
||||
.forEach(elem => EventHandler.on(elem, 'mouseover', null, noop))
|
||||
.forEach(elem => EventHandler.on(elem, 'mouseover', noop))
|
||||
}
|
||||
|
||||
this._element.focus()
|
||||
@ -222,7 +222,7 @@ class Dropdown extends BaseComponent {
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
[].concat(...document.body.children)
|
||||
.forEach(elem => EventHandler.off(elem, 'mouseover', null, noop))
|
||||
.forEach(elem => EventHandler.off(elem, 'mouseover', noop))
|
||||
}
|
||||
|
||||
if (this._popper) {
|
||||
@ -435,7 +435,7 @@ class Dropdown extends BaseComponent {
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
[].concat(...document.body.children)
|
||||
.forEach(elem => EventHandler.off(elem, 'mouseover', null, noop))
|
||||
.forEach(elem => EventHandler.off(elem, 'mouseover', noop))
|
||||
}
|
||||
|
||||
if (context._popper) {
|
||||
|
Loading…
Reference in New Issue
Block a user