Fixed an error in containermenu where applying a prefix filter would
leave no item in the entire menu marked as active, causing pressing
enter to throw an error.
Change-Id: Iebdb778629a85cdb77aa7f4a6982dba25484bff5
diff --git a/dev/js/src/containermenu.js b/dev/js/src/containermenu.js
index a272e10..865c3ec 100644
--- a/dev/js/src/containermenu.js
+++ b/dev/js/src/containermenu.js
@@ -165,7 +165,7 @@
* @param {string} Prefix for filtering the list
*/
show : function (active) {
- //there are only two new lines, marked with NEW
+ //There are only four new lines, marked with NEW
const t = this;
// show menu based on initial offset
@@ -177,11 +177,13 @@
if (!t._initList()) {
// The prefix is not active
- t._prefix.active(true);
+ t._prefix.active(true);
+ t.container().makeActive(); //NEW Incase the own
+ // list becomes empty we need to make container active for line 129 to work
// finally show the element
- t._el.classList.add('visible'); // TODO do I need this for container?
- t.container()._el.classList.add('visible');
+ t._el.classList.add('visible');
+ t.container()._el.classList.add('visible'); //NEW
return true;
};