]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix #17964 (#17997)
authorIlias <Deilv@users.noreply.github.com>
Sun, 30 Oct 2016 21:47:14 +0000 (23:47 +0200)
committerMark Otto <markd.otto@gmail.com>
Sun, 30 Oct 2016 21:47:14 +0000 (14:47 -0700)
* 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.

js/src/util.js

index f9e7f77fabec2809e47099104b7b6fa8214bbaed..5ddbbbf1335628b11f0ed698874e7f028bd635dc 100644 (file)
@@ -121,7 +121,7 @@ const Util = (($) => {
     },
 
     reflow(element) {
-      new Function('bs', 'return bs')(element.offsetHeight)
+      return element.offsetHeight
     },
 
     triggerTransitionEnd(element) {