mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user