Highlight (goTo) the first item on each keystroke
See original GitHub issueHow can I highlight (goTo) to the first item in the results on each keystroke?
I tried with this, but this will work only on the first keystroke, when result box is opened.
document.querySelector("#autoselect").addEventListener("open", function (event) {
autoSelect.goTo(0);
});
Is there an event which will fire on earch refresh of the results?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to Highlight or Select Text - Computer Hope
Press and hold your primary mouse button (commonly the left button). While holding the mouse button, drag the cursor to the end of...
Read more >7 Keyboard Shortcuts for Selecting Cells and Ranges in Excel
Learn keyboard shortcuts that will help make navigating your worksheet, selecting cells, and highlighting ranges a better experience.
Read more >user interface - Jump to listbox item by typing first few characters
The only way I can think to do this is to derive from CListBox, capture the keystrokes myself, find the item, run a...
Read more >Keyboard shortcuts in Word - Microsoft Support
Select the first or last cell in the row, and then press Shift+Alt+End or Home. Select the whole table. Alt+5 on the numeric...
Read more >Keyboard Shortcuts - Millersville University
Instead of an SAP icon button, you can use a keyboard shortcut. A keyboard shortcut is a ... Select the first item; click...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You should be able to use
config.resultsList.element
. It’s invoked by autoComplete.js every time the list is updated, right before it’s opened.I’ve not tested it, but seems to me it should work.
@TarekRaafat thank you for quick response
I have tried that already but it looks like the
results
event is fired when the results are ready, not after they are displayed, so it doesn’t work out of the box.However, I have managed to achieve what I want with small delay in
results
event usingsetTimeout
, but I would appreciate some straight forward solution, if there is any.