From ff1191d24a34d96a1d05fd9eea2fb06d55473aa8 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Wed, 29 Apr 2020 13:04:05 +0200 Subject: [PATCH] toolbar: display the "+" icon to show all buttons only on mobile layout Otherwise the "+" button is displayed on top of the menu_right toolbar --- src/static/js/pad_editbar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index df583336..c832e973 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -312,7 +312,11 @@ var padeditbar = (function() // reset style $('.toolbar').removeClass('cropped') var menu_left = $('.toolbar .menu_left')[0]; - if (menu_left && menu_left.scrollWidth > $('.toolbar').width()) { + + // on mobile the menu_right get displayed at the bottom of the screen + var isMobileLayout = $('.toolbar .menu_right').css('position') === 'fixed'; + + if (menu_left && menu_left.scrollWidth > $('.toolbar').width() && isMobileLayout) { $('.toolbar').addClass('cropped'); } }