1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-11 16:14:04 +02:00

Remove MSPointerEvent and ms-touch-action in tests (#30463)

This commit is contained in:
XhmikosR
2020-03-29 09:59:54 +03:00
committed by GitHub
parent ed94976ea8
commit e1f5d819c7
2 changed files with 5 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ class Carousel {
this._element = element this._element = element
this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element) this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent) this._pointerEvent = Boolean(window.PointerEvent)
this._addEventListeners() this._addEventListeners()
Data.setData(element, DATA_KEY, this) Data.setData(element, DATA_KEY, this)

View File

@@ -5,12 +5,11 @@ import EventHandler from '../../src/dom/event-handler'
import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture'
describe('Carousel', () => { describe('Carousel', () => {
const { Simulator, PointerEvent, MSPointerEvent } = window const { Simulator, PointerEvent } = window
const originWinPointerEvent = PointerEvent || MSPointerEvent const originWinPointerEvent = PointerEvent
const supportPointerEvent = Boolean(PointerEvent || MSPointerEvent) const supportPointerEvent = Boolean(PointerEvent)
window.MSPointerEvent = null const cssStyleCarousel = '.carousel.pointer-event { touch-action: none; }'
const cssStyleCarousel = '.carousel.pointer-event { -ms-touch-action: none; touch-action: none; }'
const stylesCarousel = document.createElement('style') const stylesCarousel = document.createElement('style')
stylesCarousel.type = 'text/css' stylesCarousel.type = 'text/css'