feature: add keyboard shortcut hubl#524
This commit is contained in:
parent
4e9d58452f
commit
acb6d0726d
@ -5,7 +5,7 @@ const HublSearchUsers = widgetFactory(
|
||||
`<input
|
||||
data-holder
|
||||
autocomplete="off"
|
||||
placeholder="\${label}"
|
||||
placeholder="\${label} (^ + K)"
|
||||
type="text"
|
||||
name="\${name}"
|
||||
value="\${escapedValue}"
|
||||
|
10
src/scripts/keyboard-shortcuts.js
Normal file
10
src/scripts/keyboard-shortcuts.js
Normal file
@ -0,0 +1,10 @@
|
||||
document.addEventListener("keydown", function (e) {
|
||||
/*
|
||||
CTRL + K : Focus on the user search
|
||||
Keycode 75
|
||||
*/
|
||||
if(e.ctrlKey && e.which == 75) {
|
||||
document.querySelector('hubl-search-users > input').focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user