Mention popup focus fix
Previously it used span elements to focus popup listbox. Now the listbox itself takes focus because entries don't have tabindex anymore so they are not selected when tab key is pressed Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I5ef87cf1717b1249994bbf435fa9a55738c81a12
This commit is contained in:
parent
ebbcd13a62
commit
847ade2422
1 changed files with 2 additions and 2 deletions
|
@ -906,9 +906,9 @@ L.TextInput = L.Layer.extend({
|
|||
var mentionPopup = L.DomUtil.get('mentionPopup');
|
||||
if (mentionPopup) {
|
||||
if (ev.key === 'ArrowDown') {
|
||||
var initialFocusElement =
|
||||
document.querySelector('#mentionPopup span[tabIndex="0"]');
|
||||
var initialFocusElement = document.querySelector('#mentionPopup span');
|
||||
if (initialFocusElement) {
|
||||
initialFocusElement.tabIndex = 0;
|
||||
initialFocusElement.focus();
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
|
Loading…
Reference in a new issue