From: Ilias Date: Sun, 30 Oct 2016 21:47:14 +0000 (+0200) Subject: Fix #17964 (#17997) X-Git-Tag: v4.0.0-alpha.6~459^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf439363775c98d900f7ef3d6d0297fa8887ef58;p=thirdparty%2Fbootstrap.git Fix #17964 (#17997) * Fix #17964 Some browsers are lazy when updating dom elements after transition effects. This can be fixed by reading element properties such as offsetHeight or offsetWidth. However, creating a function using the Function constructor just to access such element, results in a violation of Content Security Policy (where applied), which in turn crashes the application. This fix actually reverts to the way this was handled in v3 and should work as intended. --- diff --git a/js/src/util.js b/js/src/util.js index f9e7f77fab..5ddbbbf133 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -121,7 +121,7 @@ const Util = (($) => { }, reflow(element) { - new Function('bs', 'return bs')(element.offsetHeight) + return element.offsetHeight }, triggerTransitionEnd(element) {