EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Fix navbar overflow width calculation (#3738)
Eymen Elkum9ee4690afaac
diff --git a/client/src/views/site/navbar.js b/client/src/views/site/navbar.jsindex 145f15eefd..31d59954fb 100644--- a/client/src/views/site/navbar.js+++ b/client/src/views/site/navbar.js@@ -648,6 +648,7 @@ class NavbarSiteView extends View {};const $navbar = $('#navbar .navbar');+ const navbarRightElement = this.$navbarRight.get(0);if (window.innerWidth >= smallScreenWidth) {$tabs.children('li').each(() => {@@ -658,8 +659,6 @@ class NavbarSiteView extends View {$navbar.css('overflow', 'visible');}- const navbarBaseWidth = this.navbarHeaderElement.clientWidth + this.$navbarRight.width();-const tabCount = this.tabList.length;const navbarNeededHeight = navbarHeight + 1;@@ -672,6 +671,7 @@ class NavbarSiteView extends View {const updateWidth = () => {const windowWidth = window.innerWidth;const moreWidth = $moreLi.width();+ const navbarRightWidth = navbarRightElement.offsetWidth;$more.children('li.not-in-more').each(() => {unhideOneTab();@@ -687,6 +687,8 @@ class NavbarSiteView extends View {$more.parent().addClass('hidden');const headerWidth = this.$el.width();+ const navbarBaseWidth =+ this.navbarHeaderElement.clientWidth + navbarRightWidth;const maxWidth = headerWidth - navbarBaseWidth - moreWidth;let width = $tabs.width();