From 51d924c1f89bdb07cacbbf7c71f227ffa319ef73 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Tue, 21 Apr 2020 23:46:54 +0200 Subject: [PATCH] css: Fix last commit overflow should not apply to inner-editors (#3914) * css: Fix last commit overflow should not apply to inner-editors * css: hide toolbar popup and nice-select when clicking on pad --- src/static/css/pad/form.css | 3 +++ src/static/css/pad/layout.css | 4 +++- src/static/js/pad_editbar.js | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/static/css/pad/form.css b/src/static/css/pad/form.css index 5b42290a5..d0dcb7596 100644 --- a/src/static/css/pad/form.css +++ b/src/static/css/pad/form.css @@ -158,6 +158,9 @@ select, .nice-select { .nice-select .option:hover,.nice-select .option.focus,.nice-select .option.selected.focus { background-color: #f6f6f6; } +.nice-select .option[data-value="dummy"] { + display: none; +} .nice-select .option.selected { font-weight: bold; } diff --git a/src/static/css/pad/layout.css b/src/static/css/pad/layout.css index 1bd7e8871..0d583f329 100644 --- a/src/static/css/pad/layout.css +++ b/src/static/css/pad/layout.css @@ -1,10 +1,12 @@ html, body { width: 100%; height: 100%; - overflow: hidden; margin: 0; padding: 0; } +html:not(.inner-editor), html:not(.inner-editor) body { + overflow: hidden; +} body { display: flex; flex-direction: column; diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index c73f38c18..f1e0fb17e 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -217,6 +217,9 @@ var padeditbar = (function() return; } + $('.nice-select').removeClass('open'); + $('.toolbar-popup').removeClass("popup-show"); + // hide all modules and remove highlighting of all buttons if(moduleName == "none") { @@ -235,13 +238,12 @@ var padeditbar = (function() var isAForceReconnectMessage = module.find('button#forcereconnect:visible').length > 0; if(isAForceReconnectMessage) continue; - - if(module.css('display') != "none") - { + if (module.hasClass('popup-show')) { $("li[data-key=" + thisModuleName + "] > a").removeClass("selected"); module.removeClass("popup-show"); } } + if(!returned && cb) return cb(); } else