Focus on highlighted list item
See original GitHub issueHi, I’m trying to focus on the highlighted list item when pressing the down or up arrow key. I use to have a long list of users to mention and I want to auto scroll the list down next to the highlighted item. I’ve tried to add this quill keyboard handler for down arrow but it didn’t work:
down: {
key: 40,
handler: function(range: any, context: any) {
const mentionListItem: any = document.querySelector('.ql-mention-list-item.selected');
const focusList: any = findDOMNode(mentionListItem).nextSibling;
// TODO: know how to focus list item
mentionListItem.focus();
return true;
}
}
I guess because we already return false to the downHandler function of quill-mention module? Is there a way we focus the item to scroll it down to the remaining items of the list? Like in this example .
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Highlight of ListView items without setting the focus [duplicate]
I just want one item - same as it is typed in the textBox - to be highlighted .. but this sounds to...
Read more >Displaying highlight on selected item when control is not ...
My problem is that items in the listview's selectedItems collection only appear highlighted when the listview control has focus. Thus, if you ...
Read more >Use a rule to select/highlight a row in a List View | Community
Hi,is there a way to use a rule to highlight/select a specific row in a List View? I know the ID of the...
Read more >retain blue background on listview selected item when focus ...
When I select an item in a listview, the selected item's background turns blue. When I click on a button on the same...
Read more >DropdownList highlighted item using keyboard not in focus
Hi, When we press key n on keyboard dropdown list is highlighting first item with n key but it's not in focus we...
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
Got it. Thanks! Here’s my pull request #8
@abelski21 You need to fork the branch first. Then you need to make a pull request from your branch to this master branch.