From a4ad3a4ea95abd358cb973bcac5a40e70a126332 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 2 Dec 2017 08:48:23 -0500 Subject: [PATCH] put back ability for "owner" of popup panel to resize it (regression from 878d4fa6d50b) --- src/js/logger-ui.js | 2 +- src/js/popup.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index 81378cb..e5e34fd 100644 --- a/src/js/logger-ui.js +++ b/src/js/logger-ui.js @@ -762,7 +762,7 @@ var popupManager = (function() { var onResizeRequested = function() { var popupBody = popup.contentWindow.document.body; - if ( popupBody.getAttribute('data-resize-popup') !== 'true' ) { + if ( popupBody.hasAttribute('data-resize-popup') === false ) { return; } popupBody.removeAttribute('data-resize-popup'); diff --git a/src/js/popup.js b/src/js/popup.js index fdf9b97..00bcd6e 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -56,6 +56,10 @@ } })(); +var popupWasResized = function() { + document.body.setAttribute('data-resize-popup', ''); +}; + var resizePopup = (function() { var timer; var fix = function() { @@ -73,6 +77,7 @@ var resizePopup = (function() { 'hConstrained', window.innerWidth < document.body.clientWidth ); + popupWasResized(); }; return function() { if ( timer !== undefined ) { @@ -371,6 +376,7 @@ function toggleCollapseState(elem) { } else { toggleSpecificCollapseState(elem); } + popupWasResized(); } function toggleMainCollapseState(uelem) { @@ -449,6 +455,7 @@ function updateMatrixColors() { expandos = expandosFromNode(cell); addCellClass(cell, expandos.hostname, expandos.reqType); } + popupWasResized(); } /******************************************************************************/