Permalink
Browse files

BUG Fix the re-layouting not being triggered in IE8.

Move onresize handler from entwine to regular event for IE8. The
fromWindow::onresize does not trigger otherwise.

Refer to http://open.silverstripe.org/ticket/8095
  • Loading branch information...
mateusz committed Dec 16, 2012
1 parent b365714 commit 8455686c367428e1f8b7ee7aed2fba7d0c301a0b
Showing with 9 additions and 1 deletion.
  1. +9 −1 admin/javascript/LeftAndMain.js
@@ -5,6 +5,11 @@ jQuery.noConflict();
*/
(function($) {
+ window.onresize = function(e) {
+ // Entwine's 'fromWindow::onresize' does not trigger on IE8. Use synthetic event.
+ $('.cms-container').trigger('windowresize');
+ }
+
// setup jquery.entwine
$.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
$.entwine('ss', function($) {
@@ -145,7 +150,10 @@ jQuery.noConflict();
fromWindow: {
onstatechange: function(){ this.handleStateChange(); },
- onresize: function(){ this.redraw(); }
+ },
+
+ 'onwindowresize': function() {
+ this.redraw();
},
'from .cms-panel': {

0 comments on commit 8455686

Please sign in to comment.