mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-09-03 07:30:53 +02:00
deploy: 50fcbccb57
This commit is contained in:
parent
4974ed8548
commit
5bed31b5dd
17 changed files with 87 additions and 53 deletions
|
@ -666,8 +666,10 @@ if(typeof document !== 'undefined') {
|
|||
} else if(event.key == 'Tab' && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) {
|
||||
/* But only if the input has selection at the end */
|
||||
let input = document.getElementById('search-input');
|
||||
if(input.selectionEnd == input.value.length && input.selectionStart != input.selectionEnd)
|
||||
if(input.selectionEnd == input.value.length && input.selectionStart != input.selectionEnd) {
|
||||
input.setSelectionRange(input.value.length, input.value.length);
|
||||
return false; /* so input won't lose focus */
|
||||
}
|
||||
|
||||
/* Select next item */
|
||||
} else if(event.key == 'ArrowDown') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue