toolbar: display the "+" icon to show all buttons only on mobile layout

Otherwise the "+" button is displayed on top of the menu_right toolbar
This commit is contained in:
Sebastian Castro 2020-04-29 13:04:05 +02:00 committed by muxator
parent f768e32373
commit ff1191d24a

View file

@ -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');
}
}