Skip to content

EspoCRM – Open Source CRM Application

dropdown up fix

Yuri Kuznetsove9f0880f010d
diff --git a/client/src/ui/app-init.js b/client/src/ui/app-init.js
index da3d00cb36..392f28649f 100644
--- a/client/src/ui/app-init.js
+++ b/client/src/ui/app-init.js
@@ -28,9 +28,14 @@
import $ from 'jquery';
-function uiAppInit() {
+/**
+ * @param {{themeManager: import('theme-manager').default}} options
+ */
+function uiAppInit(options) {
const $document = $(document);
+ const topSpaceHeight = 100;
+
$document.on('keydown.espo.button', e => {
if (
e.code !== 'Enter' ||
@@ -67,7 +72,7 @@ function uiAppInit() {
const spaceBelow = windowHeight - (top + height);
- isUp = spaceBelow < 0 && top > height;
+ isUp = spaceBelow < 0 && top - topSpaceHeight > height;
if (isUp) {
$(target).addClass('dropup');