fix width bug in popup only when needed (Chrome 66-69)

This commit is contained in:
tophf 2020-02-24 13:24:02 +03:00
parent 5b8502033a
commit 0004b5bc73
2 changed files with 5 additions and 7 deletions

View File

@ -8,12 +8,6 @@
--outer-padding: 9px; --outer-padding: 9px;
} }
html {
/* Chrome 66-?? adds a gap equal to the scrollbar width,
which looks like a bug, see https://crbug.com/821143 */
overflow: overlay;
}
html, body { html, body {
height: min-content; height: min-content;
max-height: 600px; max-height: 600px;

View File

@ -1,5 +1,5 @@
/* global configDialog hotkeys msg /* global configDialog hotkeys msg
getActiveTab FIREFOX URLS API onDOMready $ $$ prefs getActiveTab CHROME FIREFOX URLS API onDOMready $ $$ prefs
setupLivePrefs template t $create animateElement setupLivePrefs template t $create animateElement
tryJSONparse CHROME_HAS_BORDER_BUG */ tryJSONparse CHROME_HAS_BORDER_BUG */
@ -15,6 +15,10 @@ const ABOUT_BLANK = 'about:blank';
const ENTRY_ID_PREFIX_RAW = 'style-'; const ENTRY_ID_PREFIX_RAW = 'style-';
const ENTRY_ID_PREFIX = '#' + ENTRY_ID_PREFIX_RAW; const ENTRY_ID_PREFIX = '#' + ENTRY_ID_PREFIX_RAW;
if (CHROME >= 3345 && CHROME < 3533) { // Chrome 66-69 adds a gap, https://crbug.com/821143
document.head.appendChild($create('style', 'html { overflow: overlay }'));
}
toggleSideBorders(); toggleSideBorders();
initTabUrls() initTabUrls()