Clean prefix of annotation assistant, in case a menu item is chosen
Change-Id: Ic770e707e06ad743dea2f70dd8904d21eb50774f
diff --git a/dev/js/src/hint/input.js b/dev/js/src/hint/input.js
index 7145919..adb74b6 100644
--- a/dev/js/src/hint/input.js
+++ b/dev/js/src/hint/input.js
@@ -58,6 +58,14 @@
/**
+ * Reset the input value
+ */
+ reset : function () {
+ this._element.value = "";
+ },
+
+
+ /**
* Update the mirror content.
*/
update : function () {
diff --git a/dev/js/src/hint/item.js b/dev/js/src/hint/item.js
index c39c3c2..47d332b 100644
--- a/dev/js/src/hint/item.js
+++ b/dev/js/src/hint/item.js
@@ -50,12 +50,15 @@
var h = m.hint();
// m.hide();
+ // Reset prefix
+ m.prefix("");
+
// Update input field
var input = h.inputField();
input.insert(this._action).update();
e.halt();
-
+
// show alt
h.show(true);
},
diff --git a/dev/js/src/hint/menu.js b/dev/js/src/hint/menu.js
index dd99d1f..c5c7cc7 100644
--- a/dev/js/src/hint/menu.js
+++ b/dev/js/src/hint/menu.js
@@ -48,12 +48,14 @@
/**
* Hide the menu just for the moment,
- * without cleaning up anything.
+ * without cleaning up anything,
+ /* but resetting the prefix.
*/
hideWithoutDestruction : function () {
this.element().classList.remove("visible");
- if (this._hint)
+ if (this._hint) {
this._hint.inputField().element().focus();
+ };
}
};
});