Merge pull request #439 from ONLYOFFICE/bugfix/fix-hotkeys-scrolling
Web: Hotkeys: fixed scroll focus
This commit is contained in:
commit
d9b1ec35e5
@ -255,7 +255,11 @@ class AccountsHotkeysStore {
|
||||
const scroll = document.getElementsByClassName(
|
||||
"section-scroll",
|
||||
) as HTMLCollectionOf<HTMLElement>;
|
||||
if (scroll && scroll[0]) scroll[0].focus();
|
||||
|
||||
if (scroll && scroll[0]) {
|
||||
const scrollElem = scroll[0]?.firstChild as HTMLElement;
|
||||
scrollElem?.focus();
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.hotkeyCaret && selection.length) {
|
||||
|
@ -135,7 +135,7 @@ class HotkeyStore {
|
||||
|
||||
if (!hotkeyCaret) {
|
||||
const scroll = document.getElementsByClassName("section-scroll");
|
||||
scroll && scroll[0] && scroll[0].focus();
|
||||
scroll && scroll[0] && scroll[0]?.firstChild.focus();
|
||||
}
|
||||
|
||||
if (!hotkeyCaret && selection.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user