diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index 7c9fa09b8..bfe021515 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -295,21 +295,6 @@ export function uiFieldRestrictions(field, context) { surface .call(breathe); - - d3_select(window) - .on('resize.restrictions', function() { - utilSetDimensions(_container, null); - redraw(); - }); - } - - if (!_redrawHandler) { - _redrawHandler = setInterval(function() { - if (d3_select('#sidebar-resizer').classed('dragging')) { - utilSetDimensions(_container, null); - redraw(); - } - }, 50); } // This can happen if we've lowered the detail while a FROM way @@ -345,6 +330,11 @@ export function uiFieldRestrictions(field, context) { .classed('related', true); } + document.addEventListener('resizeWindow', function (e) { + utilSetDimensions(_container, null); + redraw(); + }, false); + updateHints(null); diff --git a/modules/ui/init.js b/modules/ui/init.js index e1f5a02a3..700350945 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -411,6 +411,13 @@ export function uiInit(context) { // check if header or footer have overflowed ui.checkOverflow('#bar'); ui.checkOverflow('#footer'); + + // Use older code so it works on Explorer + var resizeWindowEvent = document.createEvent('Event'); + + resizeWindowEvent.initEvent('resizeWindow', true, true); + + document.dispatchEvent(resizeWindowEvent); };