Fix 'menu below hint marker' bug
Change-Id: Id9806b5152c84bd0ddd86ba9ed0bcc1996a0fecf
diff --git a/Changes b/Changes
index a0f6a46..b2c076e 100755
--- a/Changes
+++ b/Changes
@@ -46,6 +46,7 @@
- Fix wrong handling of utf8 input in login that can
lead to server crash.
- Fix query-by-match for multiple colons.
+ - Fix "menu below hint marker" bug.
0.42 2021-06-18
- Added GitHub based CI for perl.
diff --git a/dev/js/src/hint.js b/dev/js/src/hint.js
index 119cfd7..e700b94 100644
--- a/dev/js/src/hint.js
+++ b/dev/js/src/hint.js
@@ -97,6 +97,7 @@
if (!this.classList.contains('active')) {
that.show(false);
};
+ e.halt();
});
// Move infobox
@@ -150,7 +151,7 @@
/**
- * Altert at a specific character position.
+ * Alert at a specific character position.
*/
alert : function (charPos, msg) {
const t = this;
@@ -186,6 +187,7 @@
* Return hint menu and probably init based on an action
*/
menu : function (action) {
+
if (this._menuCollection[action] === undefined) {
// No matching hint menu
@@ -238,7 +240,7 @@
// A menu or null was passed
if (arguments.length === 1) {
const c = this._inputField.container();
-
+
// Make the menu active
if (obj !== null) {
c.classList.add('active');
@@ -278,7 +280,7 @@
this.active(menu);
let e = menu.element();
- // console.log("Chrome may send a blur on the old menu here");
+ // Chrome may send a blur on the old menu here
this._active.element().blur();
this._inputField.container().appendChild(e);
diff --git a/dev/scss/base/menu.scss b/dev/scss/base/menu.scss
index b743362..4f76683 100644
--- a/dev/scss/base/menu.scss
+++ b/dev/scss/base/menu.scss
@@ -60,6 +60,7 @@
color: transparent;
width: $border-size;
}
+ overflow: hidden;
padding: $item-padding;
padding-top: 0;
padding-bottom: 0;
diff --git a/dev/scss/header/hint.scss b/dev/scss/header/hint.scss
index ae763b2..8c6c329 100644
--- a/dev/scss/header/hint.scss
+++ b/dev/scss/header/hint.scss
@@ -94,4 +94,4 @@
width: 23em;
}
}
-}
\ No newline at end of file
+}