fix!: remove checks for IE and EdgeHTML in core (#6336)

* chore: remove uses of userAgent.IE

* chore!: remove export of userAgent.IE

* format: run format

* fix!: remove special-cases for EdgeHTML browser engine

* fix!: remove export of userAgent.EDGE

* chore: remove unused dependencies

* fix: touch events in non-touch firefox
This commit is contained in:
Rachel Fenichel
2022-08-17 14:13:13 -04:00
committed by GitHub
parent e10bf99936
commit ffe6d55d5f
12 changed files with 36 additions and 89 deletions

View File

@@ -22,7 +22,6 @@ import * as deprecation from './deprecation.js';
import {Rect} from './rect.js';
import {Size} from './size.js';
import * as style from './style.js';
import * as userAgent from './useragent.js';
/**
@@ -196,12 +195,6 @@ export function getViewportBBox(): Rect {
export function getDocumentScroll(): Coordinate {
const el = document.documentElement;
const win = window;
if (userAgent.IE && win.pageYOffset !== el.scrollTop) {
// The keyboard on IE10 touch devices shifts the page using the pageYOffset
// without modifying scrollTop. For this case, we want the body scroll
// offsets.
return new Coordinate(el.scrollLeft, el.scrollTop);
}
return new Coordinate(
win.pageXOffset || el.scrollLeft, win.pageYOffset || el.scrollTop);
}