mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 09:41:11 +00:00
Return a new function with Util.noop
This commit is contained in:
parent
b5077a1a81
commit
99c3119c82
@ -322,7 +322,7 @@ class Tooltip {
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
Util.makeArray(document.body.children).forEach((element) => {
|
||||
EventHandler.on(element, 'mouseover', Util.noop)
|
||||
EventHandler.on(element, 'mouseover', Util.noop())
|
||||
})
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@ class Tooltip {
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
Util.makeArray(document.body.children)
|
||||
.forEach((element) => EventHandler.off(element, 'mouseover', Util.noop))
|
||||
.forEach((element) => EventHandler.off(element, 'mouseover', Util.noop()))
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false
|
||||
|
@ -235,8 +235,9 @@ const Util = {
|
||||
return Util.findShadowRoot(element.parentNode)
|
||||
},
|
||||
|
||||
// eslint-disable-next-line no-empty-function
|
||||
noop() {
|
||||
// eslint-disable-next-line no-empty-function
|
||||
return function () {}
|
||||
},
|
||||
|
||||
get jQuery() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user