Commit 99c3119c authored by Johann-S's avatar Johann-S Committed by XhmikosR
Browse files

Return a new function with Util.noop

parent b5077a1a
Showing with 4 additions and 3 deletions
+4 -3
......@@ -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() {
......
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