mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #17878 from overleaf/mj-keyboard-navigation-firefox-115
[web] Use getAttribute rather than accessing Element.role GitOrigin-RevId: a6732180d945ccc4ac0300af07e52228e9f2c928
This commit is contained in:
parent
955c860b64
commit
f5ac5b0ed3
1 changed files with 2 additions and 2 deletions
|
@ -189,7 +189,7 @@ const createSpellingSuggestionList = (word: Word, view: EditorView) => {
|
|||
|
||||
// get next option
|
||||
let nextElement = selectedButton.parentElement?.nextElementSibling
|
||||
if (nextElement?.role !== 'option') {
|
||||
if (nextElement?.getAttribute('role') !== 'option') {
|
||||
nextElement = nextElement?.nextElementSibling
|
||||
}
|
||||
nextElement?.querySelector('button')?.focus()
|
||||
|
@ -211,7 +211,7 @@ const createSpellingSuggestionList = (word: Word, view: EditorView) => {
|
|||
// get previous option
|
||||
let previousElement =
|
||||
selectedButton.parentElement?.previousElementSibling
|
||||
if (previousElement?.role !== 'option') {
|
||||
if (previousElement?.getAttribute('role') !== 'option') {
|
||||
previousElement = previousElement?.previousElementSibling
|
||||
}
|
||||
previousElement?.querySelector('button')?.focus()
|
||||
|
|
Loading…
Reference in a new issue