MDL-78885 aria: Fix pressing Home and End on editable comboboxes

This commit is contained in:
Shamim Rezaie 2023-10-12 09:09:43 +11:00
parent e0d2a3924e
commit 535bfb3052
6 changed files with 4 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -313,9 +313,9 @@ const comboboxFix = () => {
if (editable && !next) {
next = options[options.length - 1];
}
} else if (trigger == 'Home') {
} else if (trigger == 'Home' && !editable) {
next = options[0];
} else if (trigger == 'End') {
} else if (trigger == 'End' && !editable) {
next = options[options.length - 1];
} else if ((trigger == ' ' && !editable) || trigger == 'Enter') {
e.preventDefault();