mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure an item in action list is always selected
This commit is contained in:
parent
8c68e76c3e
commit
a73c159160
@ -49,6 +49,10 @@ RED.actionList = (function() {
|
|||||||
filterTerm = $(this).val();
|
filterTerm = $(this).val();
|
||||||
searchResults.editableList('filter');
|
searchResults.editableList('filter');
|
||||||
searchResults.find("li.selected").removeClass("selected");
|
searchResults.find("li.selected").removeClass("selected");
|
||||||
|
var children = searchResults.children(":visible");
|
||||||
|
if (children.length) {
|
||||||
|
$(children[0]).addClass('selected');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -61,7 +65,6 @@ RED.actionList = (function() {
|
|||||||
var children = searchResults.children(":visible");
|
var children = searchResults.children(":visible");
|
||||||
if (children.length) {
|
if (children.length) {
|
||||||
$(children[0]).addClass('selected');
|
$(children[0]).addClass('selected');
|
||||||
RED.a = children[0];
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var nextChild = selectedChild.nextAll(":visible").first();
|
var nextChild = selectedChild.nextAll(":visible").first();
|
||||||
@ -162,6 +165,10 @@ RED.actionList = (function() {
|
|||||||
visible = true;
|
visible = true;
|
||||||
}
|
}
|
||||||
searchInput.trigger("focus");
|
searchInput.trigger("focus");
|
||||||
|
var children = searchResults.children(":visible");
|
||||||
|
if (children.length) {
|
||||||
|
$(children[0]).addClass('selected');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
Loading…
Reference in New Issue
Block a user