Skip to content

Commit

Permalink
Fix #17964 (#17997)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
deilv authored and mdo committed Oct 30, 2016
1 parent 5099a60 commit bf43936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Util = (($) => {
},

reflow(element) {
new Function('bs', 'return bs')(element.offsetHeight)
return element.offsetHeight
},

triggerTransitionEnd(element) {
Expand Down

0 comments on commit bf43936

Please sign in to comment.