mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
Handle applying suggestion without having selected one
This commit is contained in:
@@ -293,6 +293,14 @@ RED.typeSearch = (function() {
|
||||
}
|
||||
}
|
||||
function confirm(def) {
|
||||
if (!activeSuggestion) {
|
||||
// The user has hit Enter without selecting an entry in the list.
|
||||
// This means no suggestion has been shown yet - and the position recalculation
|
||||
// has not been done.
|
||||
// Trigger an update of the suggestion to get the position right before
|
||||
// applying.
|
||||
updateSuggestion(def)
|
||||
}
|
||||
hide();
|
||||
if (!def.nodes && !/^_action_:/.test(def.type)) {
|
||||
typesUsed[def.type] = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user