aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias <[email protected]>2016-10-30 23:47:14 +0200
committerMark Otto <[email protected]>2016-10-30 14:47:14 -0700
commitbf439363775c98d900f7ef3d6d0297fa8887ef58 (patch)
treec0f2a43ba357c8829ad48d2a8d2e0617339241d7
parent5099a60ffebb5581d41b9711fb6d28c1e5dad231 (diff)
downloadbootstrap-bf439363775c98d900f7ef3d6d0297fa8887ef58.tar.xz
bootstrap-bf439363775c98d900f7ef3d6d0297fa8887ef58.zip
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.
-rw-r--r--js/src/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/util.js b/js/src/util.js
index f9e7f77fa..5ddbbbf13 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) {