From cc47ef56ec434d6352279d58eddbcab0dec12b9f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 16 Nov 2017 15:06:28 +0100 Subject: [PATCH] Remove the `onclick` polyfill for old versions of Opera This was only relevant for no obsolete versions Opera, that use the Presto engine. According to https://en.wikipedia.org/wiki/History_of_the_Opera_web_browser#Opera_2013, the last version affected was released in 2013. --- src/shared/compatibility.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index f762e76e9..2bfc74c0f 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -30,7 +30,6 @@ var isChrome = userAgent.indexOf('Chrom') >= 0; var isIOSChrome = userAgent.indexOf('CriOS') >= 0; var isIE = userAgent.indexOf('Trident') >= 0; var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); -var isOpera = userAgent.indexOf('Opera') >= 0; var isSafari = /Safari\//.test(userAgent) && !/(Chrome\/|Android\s)/.test(userAgent); @@ -143,25 +142,6 @@ PDFJS.compatibilityChecked = true; }); })(); -// Check onclick compatibility in Opera -// Support: Opera<15 -(function checkOnClickCompatibility() { - // workaround for reported Opera bug DSK-354448: - // onclick fires on disabled buttons with opaque content - function ignoreIfTargetDisabled(event) { - if (isDisabled(event.target)) { - event.stopPropagation(); - } - } - function isDisabled(node) { - return node.disabled || (node.parentNode && isDisabled(node.parentNode)); - } - if (isOpera) { - // use browser detection since we cannot feature-check this bug - document.addEventListener('click', ignoreIfTargetDisabled, true); - } -})(); - // Checks if possible to use URL.createObjectURL() // Support: IE, Chrome on iOS (function checkOnBlobSupport() {