mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-12 08:14:08 +02:00
lint fixes
This commit is contained in:
@@ -58,7 +58,7 @@ export const focusParent = (input: MaybeHTMLElement | null | undefined, self = f
|
||||
|
||||
const focusOrScroll = (element: HTMLElement, scroll: boolean) => {
|
||||
if (scroll) {
|
||||
const scrollContainer = getScrollContainer(element) ?? document.documentElement;
|
||||
const scrollContainer = getScrollContainer(element) ?? window.document.documentElement;
|
||||
const scrollContainerTop = getScrollPosition(scrollContainer);
|
||||
const stickyTop = getStickyTop(element, scrollContainer);
|
||||
const stickyBottom = getStickyBottom(element, scrollContainer);
|
||||
@@ -74,7 +74,7 @@ const focusOrScroll = (element: HTMLElement, scroll: boolean) => {
|
||||
scrollContainer.scrollTo({ top: scrollTo, behavior: 'instant' });
|
||||
}
|
||||
|
||||
if (document.activeElement !== element) {
|
||||
if (window.document.activeElement !== element) {
|
||||
element.focus({ preventScroll: true });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user