Return a new function with Util.noop
This commit is contained in:
parent
b5077a1a81
commit
99c3119c82
2 changed files with 4 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue