Fix bug where event bubbles on prefix click in hint menu

Change-Id: I8a569d9183928514e69fee4faeae97f2b4253dbf
diff --git a/dev/js/src/hint/menu.js b/dev/js/src/hint/menu.js
index b7e0d49..89f1d10 100644
--- a/dev/js/src/hint/menu.js
+++ b/dev/js/src/hint/menu.js
@@ -21,7 +21,7 @@
      * Create new hint helper menu.
      */
     create : function (hint, context, params) {
-      var obj = Object.create(menuClass)
+      const obj = Object.create(menuClass)
 	        .upgradeTo(this)
 	        ._init(params, {
 	          itemClass : itemClass,
@@ -41,7 +41,7 @@
 
       // Focus on input field on hide
       obj.onHide = function () {
-        var h = this._hint;
+        const h = this._hint;
         h._inputField.element().focus();
         if (h.active() !== null) {
           if (h._alert.active) {
diff --git a/dev/js/src/hint/prefix.js b/dev/js/src/hint/prefix.js
index 5a83284..1a673f8 100644
--- a/dev/js/src/hint/prefix.js
+++ b/dev/js/src/hint/prefix.js
@@ -14,14 +14,15 @@
     /**
      * Override the prefix action.
      */
-    onclick : function () {
+    onclick : function (e) {
       const m = this.menu();
       const value = this.value();
       const h = m.hint();
-      m.hide();
-
       h.inputField().insert(value);
-      h.active = false;
+      h.active(null);
+      m.hide();
+      // h.unshow();
+      e.halt();
     }
   };
 });