1
0
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:
Johann-S 2017-11-01 12:28:03 +01:00 committed by XhmikosR
parent b5077a1a81
commit 99c3119c82
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

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