mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
ensure input box has focus on repeated quick add
This commit is contained in:
parent
dc75a5812f
commit
22855279bd
@ -47,7 +47,7 @@ RED.typeSearch = (function() {
|
|||||||
function createDialog() {
|
function createDialog() {
|
||||||
dialog = $("<div>",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#red-ui-main-container");
|
dialog = $("<div>",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#red-ui-main-container");
|
||||||
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog);
|
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog);
|
||||||
searchInput = $('<input type="text" id="red-ui-type-search-input">').attr("placeholder",RED._("search.addNode")).appendTo(searchDiv).searchBox({
|
searchInput = $('<input type="text" id="red-ui-type-search-input" autofocus>').attr("placeholder",RED._("search.addNode")).appendTo(searchDiv).searchBox({
|
||||||
delay: 50,
|
delay: 50,
|
||||||
change: function() {
|
change: function() {
|
||||||
search($(this).val());
|
search($(this).val());
|
||||||
@ -283,7 +283,7 @@ RED.typeSearch = (function() {
|
|||||||
function refreshTypeList(opts) {
|
function refreshTypeList(opts) {
|
||||||
var i;
|
var i;
|
||||||
searchResults.editableList('empty');
|
searchResults.editableList('empty');
|
||||||
searchInput.searchBox('value','');
|
searchInput.searchBox('value','').focus();
|
||||||
selected = -1;
|
selected = -1;
|
||||||
var common = [
|
var common = [
|
||||||
'inject','debug','function','change','switch'
|
'inject','debug','function','change','switch'
|
||||||
|
Loading…
Reference in New Issue
Block a user