Remove the remaining IE-specific checks from web/grab_to_pan.js (PR 12328 follow-up)

Given that all versions of Internet Explorer are now *explicitly* unsupported, we can remove some more dead code in this file.
This commit is contained in:
Jonas Jenwald 2021-03-25 15:36:37 +01:00
parent 63471bcbbe
commit 3c3cbe78ae

View File

@ -194,7 +194,6 @@ let matchesSelector;
// Browser sniffing because it's impossible to feature-detect // Browser sniffing because it's impossible to feature-detect
// whether event.which for onmousemove is reliable // whether event.which for onmousemove is reliable
const isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9;
const chrome = window.chrome; const chrome = window.chrome;
const isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); const isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app);
// ^ Chrome 15+ ^ Opera 15+ // ^ Chrome 15+ ^ Opera 15+
@ -209,10 +208,9 @@ const isSafari6plus =
* False if unsure or if the left mouse button is pressed. * False if unsure or if the left mouse button is pressed.
*/ */
function isLeftMouseReleased(event) { function isLeftMouseReleased(event) {
if ("buttons" in event && isNotIEorIsIE10plus) { if ("buttons" in event) {
// http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons
// Firefox 15+ // Firefox 15+
// Internet Explorer 10+
return !(event.buttons & 1); return !(event.buttons & 1);
} }
if (isChrome15OrOpera15plus || isSafari6plus) { if (isChrome15OrOpera15plus || isSafari6plus) {