From b4accaad07cb6478024f40a429251812fa33233e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 12 Jan 2022 17:14:06 +0100 Subject: [PATCH] :bug: Fix scroll jumps in handoff mode --- CHANGES.md | 1 + frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ebbe844897..633a9b697c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -53,6 +53,7 @@ - Fix default page id in workspace [Taiga #2205](https://tree.taiga.io/project/penpot/issue/2205) - Fix problem when importing a file with grids [Taiga #2314](https://tree.taiga.io/project/penpot/issue/2314) - Fix issues when updating selrect in paths [Taiga #2366](https://tree.taiga.io/project/penpot/issue/2366) +- Fix scroll jumps in handoff mode [Taiga #2383](https://tree.taiga.io/project/penpot/issue/2383) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs b/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs index 48aa1a5aae..6dd87c2a76 100644 --- a/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs +++ b/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs @@ -59,7 +59,7 @@ (mf/deps selected) (fn [] (when (and (= (count selected) 1) selected?) - (.scrollIntoView (mf/ref-val item-ref) false)))) + (dom/scroll-into-view-if-needed! (mf/ref-val item-ref) true)))) [:li {:ref item-ref :class (dom/classnames