From: Alexander Ebert Date: Thu, 28 Jul 2016 18:59:12 +0000 (+0200) Subject: Some more fixes for IE and Edge X-Git-Tag: 3.0.0_Beta_1~927 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3274a36afd0eda64242da8202ff488eae2000f66;p=GitHub%2FWoltLab%2FWCF.git Some more fixes for IE and Edge Obviously Safari and Edge are equally garbage now, yay! --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js index 3427d48026..ef64f2bb4b 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js @@ -154,8 +154,8 @@ define(['Environment', 'StringUtil'], function(Environment, StringUtil) { var rect = el.getBoundingClientRect(); return { - top: rect.top + window.pageYOffset, - left: rect.left + window.pageXOffset + top: Math.round(rect.top + (window.scrollY || window.pageYOffset)), + left: Math.round(rect.left + (window.scrollX || window.pageXOffset)) }; }, @@ -198,7 +198,7 @@ define(['Environment', 'StringUtil'], function(Environment, StringUtil) { setStyles: function(el, styles) { var important = false; for (var property in styles) { - if (objOwns(styles, property)) { + if (styles.hasOwnProperty(property)) { if (/ !important$/.test(styles[property])) { important = true; @@ -208,10 +208,10 @@ define(['Environment', 'StringUtil'], function(Environment, StringUtil) { important = false; } - // for a set style property with priority = important, Safari is not able to - // overwrite it with a property != important; removing the property first - // solves the issue - if (Environment.browser() === 'safari' && el.style.getPropertyPriority(property) === 'important' && !important) { + // for a set style property with priority = important, some browsers are + // not able to overwrite it with a property != important; removing the + // property first solves this issue + if (el.style.getPropertyPriority(property) === 'important' && !important) { el.style.removeProperty(property); }