mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3789 from Steve-Mcl/fix-focus-issues
Fix focus issues
This commit is contained in:
commit
ede82ad0d5
@ -766,7 +766,7 @@ var RED = (function() {
|
|||||||
$('<div id="red-ui-header-shade" class="hide"></div>').appendTo(header);
|
$('<div id="red-ui-header-shade" class="hide"></div>').appendTo(header);
|
||||||
$('<div id="red-ui-main-container" class="red-ui-sidebar-closed hide">'+
|
$('<div id="red-ui-main-container" class="red-ui-sidebar-closed hide">'+
|
||||||
'<div id="red-ui-workspace"></div>'+
|
'<div id="red-ui-workspace"></div>'+
|
||||||
'<div id="red-ui-editor-stack"></div>'+
|
'<div id="red-ui-editor-stack" tabindex="-1"></div>'+
|
||||||
'<div id="red-ui-palette"></div>'+
|
'<div id="red-ui-palette"></div>'+
|
||||||
'<div id="red-ui-sidebar"></div>'+
|
'<div id="red-ui-sidebar"></div>'+
|
||||||
'<div id="red-ui-sidebar-separator"></div>'+
|
'<div id="red-ui-sidebar-separator"></div>'+
|
||||||
|
@ -63,6 +63,10 @@ RED.contextMenu = (function () {
|
|||||||
splice: isSingleLink ? selection.links[0] : undefined,
|
splice: isSingleLink ? selection.links[0] : undefined,
|
||||||
// spliceMultiple: isMultipleLinks
|
// spliceMultiple: isMultipleLinks
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
onpostselect: function() {
|
||||||
|
// ensure quick add dialog search input has focus
|
||||||
|
$('#red-ui-type-search-input').trigger('focus')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(hasLinks) ? { // has least 1 wire selected
|
(hasLinks) ? { // has least 1 wire selected
|
||||||
|
@ -1105,6 +1105,10 @@ RED.editor = (function() {
|
|||||||
if (editing_node) {
|
if (editing_node) {
|
||||||
RED.sidebar.info.refresh(editing_node);
|
RED.sidebar.info.refresh(editing_node);
|
||||||
RED.sidebar.help.show(editing_node.type, false);
|
RED.sidebar.help.show(editing_node.type, false);
|
||||||
|
//ensure focused element is NOT body (for keyboard scope to operate correctly)
|
||||||
|
if (document.activeElement.tagName === 'BODY') {
|
||||||
|
$('#red-ui-editor-stack').trigger('focus')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user