// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement &&
$(parent).closest(Selector.NAVBAR_NAV).length === 0) {
- $('body').children().on('mouseover', null, $.noop)
+ $(document.body).children().on('mouseover', null, $.noop)
}
this._element.focus()
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
- $('body').children().off('mouseover', null, $.noop)
+ $(document.body).children().off('mouseover', null, $.noop)
}
toggles[i].setAttribute('aria-expanded', 'false')
// Adjust body padding
const actualPadding = document.body.style.paddingRight
- const calculatedPadding = $('body').css('padding-right')
- $('body').data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
+ const calculatedPadding = $(document.body).css('padding-right')
+ $(document.body).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
}
}
})
// Restore body padding
- const padding = $('body').data('padding-right')
+ const padding = $(document.body).data('padding-right')
if (typeof padding !== 'undefined') {
- $('body').css('padding-right', padding).removeData('padding-right')
+ $(document.body).css('padding-right', padding).removeData('padding-right')
}
}
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
- $('body').children().on('mouseover', null, $.noop)
+ $(document.body).children().on('mouseover', null, $.noop)
}
const complete = () => {
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
- $('body').children().off('mouseover', null, $.noop)
+ $(document.body).children().off('mouseover', null, $.noop)
}
this._activeTrigger[Trigger.CLICK] = false