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', null, noop))
}
this._element.focus()
// 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', null, noop))
}
if (this._popper) {
// 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', null, noop))
}
if (context._popper) {
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
[].concat(...document.body.children).forEach(element => {
- EventHandler.on(element, 'mouseover', noop())
+ EventHandler.on(element, 'mouseover', noop)
})
}
})
describe('noop', () => {
- it('should return a function', () => {
- expect(typeof Util.noop()).toEqual('function')
+ it('should be a function', () => {
+ expect(typeof Util.noop).toEqual('function')
})
})