EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
dropdown fix
Yuri Kuznetsov1fe2c74691ca
diff --git a/client/src/ui/app-init.js b/client/src/ui/app-init.jsindex 392f28649f..d19029890c 100644--- a/client/src/ui/app-init.js+++ b/client/src/ui/app-init.js@@ -28,10 +28,7 @@import $ from 'jquery';-/**- * @param {{themeManager: import('theme-manager').default}} options- */-function uiAppInit(options) {+function uiAppInit() {const $document = $(document);const topSpaceHeight = 100;@@ -67,6 +64,8 @@ function uiAppInit(options) {const height = $dropdown.outerHeight();{+ const $target = $(target);+const windowHeight = $(window).height();const top = e.target.getBoundingClientRect().bottom;@@ -74,10 +73,14 @@ function uiAppInit(options) {isUp = spaceBelow < 0 && top - topSpaceHeight > height;+ if ($target.hasClass('more') || $target.hasClass('tab')) {+ return;+ }+if (isUp) {- $(target).addClass('dropup');+ $target.addClass('dropup');} else {- $(target).removeClass('dropup');+ $target.removeClass('dropup');}}