diff --git a/dev/js/spec/menuSpec.js b/dev/js/spec/menuSpec.js
index db3e968..a60d7ab 100644
--- a/dev/js/spec/menuSpec.js
+++ b/dev/js/spec/menuSpec.js
@@ -819,6 +819,24 @@
         expect(menu.shownItem(2)).toBe(undefined);
       });
 
+      it('should be filterable (trimming = " p")', function () {
+        var menu = KorAP.HintMenu.create("/p=", listMultiPrefix);
+        // menu._firstActive = true;
+
+        menu.limit(2);
+        expect(menu.show()).toBe(true);
+        menu._prefix.add(" ");
+        expect(menu.show()).toBe(true);
+        menu._prefix.add("p")
+        expect(menu.show()).toBe(true);
+        expect(menu.shownItem(0).name()).toEqual("PP");
+        expect(menu.element().childNodes[3].innerHTML).toEqual(
+          "<strong><mark>P</mark><mark>P</mark></strong>"+
+            "<span><mark>P</mark>ersonal <mark>P</mark>ronoun</span>"
+        );
+      });
+
+      
       it('should choose prefix with failing prefix (1)', function () {
         var menu = KorAP.HintMenu.create("cnx/", list);
         menu.limit(2);
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index c3f7fa6..859e109 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -4,7 +4,6 @@
  * @author Nils Diewald
  */
 /*
- * TODO: space is not a valid prefix!
  * TODO: Show the slider briefly on move (whenever screen is called).
  * TODO: Ignore alt+ and strg+ key strokes.
  * TODO: Should scroll to a chosen value after prefixing, if the chosen value is live
diff --git a/dev/js/src/menu/item.js b/dev/js/src/menu/item.js
index 835f69f..812a398 100644
--- a/dev/js/src/menu/item.js
+++ b/dev/js/src/menu/item.js
@@ -179,7 +179,12 @@
 
       // Split prefixes
       if (prefixString) {
-        var prefixes = prefixString.trim().split(" ");
+
+        // ND:
+        //   Doing this in a single line can trigger
+        //   a deep-recursion in Firefox 57.01, though I don't know why.
+        prefixString = prefixString.trim();
+        var prefixes = prefixString.split(" ");
 
         var prefix;
         var testPos;
@@ -237,43 +242,6 @@
 	        p.removeChild(elem);
         };
       };
-
-      /*
-      pos = textlc.indexOf(prefix);
-
-      // Matches!
-      if (pos >= 0) {
-	
-	      // First element
-	      if (pos > 0) {
-	        elem.parentNode.insertBefore(
-	          document.createTextNode(text.substr(0, pos)),
-	          elem
-	        );
-	      };
-	
-	      // Second element
-	      var hl = document.createElement("mark");
-	      hl.appendChild(
-	        document.createTextNode(text.substr(pos, prefix.length))
-	      );
-	      elem.parentNode.insertBefore(hl, elem);
-	
-	      // Third element
-	      var third = text.substr(pos + prefix.length);
-	      if (third.length > 0) {
-	        var thirdE = document.createTextNode(third);
-	        elem.parentNode.insertBefore(
-	          thirdE,
-	          elem
-	        );
-	        this._highlight(thirdE, prefix);
-	      };
-	
-	      var p = elem.parentNode;
-	      p.removeChild(elem);
-      };
-      */
     }
     else {
       var children = elem.childNodes;
