diff --git a/src/routes/_components/compose/ComposeInput.html b/src/routes/_components/compose/ComposeInput.html index c7699bd..ff93779 100644 --- a/src/routes/_components/compose/ComposeInput.html +++ b/src/routes/_components/compose/ComposeInput.html @@ -88,7 +88,7 @@ firstTime = false let { autoFocus } = this.get() if (autoFocus) { - requestAnimationFrame(() => textarea.focus()) + requestAnimationFrame(() => textarea.focus({ preventScroll: true })) } } }) diff --git a/src/routes/_components/status/StatusToolbar.html b/src/routes/_components/status/StatusToolbar.html index 968a793..b236ffd 100644 --- a/src/routes/_components/status/StatusToolbar.html +++ b/src/routes/_components/status/StatusToolbar.html @@ -147,7 +147,7 @@ } try { // return status to the reply button after posting a reply - this.refs.node.querySelector('.status-toolbar-reply-button').focus() + this.refs.node.querySelector('.status-toolbar-reply-button').focus({ preventScroll: true }) } catch (e) { /* ignore */ } } }, diff --git a/src/routes/_components/timeline/Timeline.html b/src/routes/_components/timeline/Timeline.html index 8d673cd..e426452 100644 --- a/src/routes/_components/timeline/Timeline.html +++ b/src/routes/_components/timeline/Timeline.html @@ -280,7 +280,7 @@ requestAnimationFrame(() => { let element = document.getElementById(lastFocusedElementId) if (element) { - element.focus() + element.focus({ preventScroll: true }) } }) })