dont use sidebar width if its not visible

This commit is contained in:
Barış Soner Uşaklı 2023-08-13 10:29:14 -04:00
parent e6c3cc8461
commit cd5a435869

View file

@ -31,7 +31,8 @@ $(document).ready(function () {
const css = {
width: $('#panel').width(),
};
css[isRtl ? 'right' : 'left'] = $('.sidebar-left').outerWidth(true);
const sidebarEl = $('.sidebar-left');
css[isRtl ? 'right' : 'left'] = sidebarEl.is(':visible') ? sidebarEl.outerWidth(true) : 0;
$('[component="composer"]').css(css);
});