Commit Graph

19 Commits

Author SHA1 Message Date
Julien Calixte
84803c45dd refactor(scroll): clean up debug overlay and pass anchor by param
Removes the temporary on-screen scroll diagnosis panel and the global
window.__scrollAtClick stash. The anchor scrollTop is now captured
synchronously at addStackedNote entry and threaded through
scrollToFocusedNote and scrollToNoteElement to scrollToElement, so no
state survives across calls — nothing to reset on repo or page change.
2026-05-04 23:02:12 +02:00
Julien Calixte
a526a9f6af fix(scroll): snap to click-time scrollTop before smooth scroll
Capture mainApp.scrollTop synchronously when addStackedNote runs and
snap the scroll back to that value before scrollIntoView fires, so
the smooth scroll begins from where the user actually tapped rather
than from a position drifted by momentum or async work.
2026-05-04 19:57:00 +02:00
Julien Calixte
c88340d5f1 chore(debug): add temporary scroll overlay for mobile diagnosis 2026-05-04 19:02:35 +02:00
Julien Calixte
cc266eac7c refactor(scroll): delegate note scroll to scrollIntoView
Native scrollIntoView reads the element position at scroll time and
picks the right scrollable ancestor itself, sidestepping iOS Safari
quirks with scrollTo on overflow containers and visual-viewport shifts.
2026-05-04 18:29:05 +02:00
Julien Calixte
be006f08b4 fix(stacked-note): align mobile scroll target to element rect
Replace the (index + 1) * clientHeight math and 80ms setTimeout with a
scrollToElement helper that reads getBoundingClientRect inside rAF, so
the smooth scroll starts from the user's actual position even when the
note is freshly mounted.
2026-05-04 18:15:10 +02:00
Julien Calixte
19495ddf0c feat(scroll): use smooth scrollTo instead of direct property assignment 2026-04-23 18:07:44 +02:00
Julien Calixte
63bc3f4d5d fix(mobile): scroll #main-app instead of body on mobile
body/html have overflow:hidden so scrollTop is a no-op on them.
#main-app is the actual scroll container; use overflow-y:auto on
mobile and target it directly in scrollToNote and the scroll listener.
2026-04-23 18:01:30 +02:00
Julien Calixte
5f48aa5690 chore: lint and fmt 2026-03-28 09:38:55 +01:00
Julien Calixte
8da5dcc50f fix: scroll both body and documentElement for cross-browser compatibility 2026-02-19 19:19:49 +01:00
Julien Calixte
4a06c11b0a fix: use window scroll API for cross-browser compatibility (Safari) 2026-02-19 19:03:06 +01:00
Julien Calixte
9f0e6007a2 try to hotfix the not autofocus 2023-12-28 17:17:14 +01:00
Julien Calixte
2cab8c8e3f autoimport with eslint now 2023-08-14 18:04:27 +02:00
35503601f3 🐛 (focus) wait 100 for first stacked note 2021-04-10 12:34:17 +02:00
098be04c64 💄 (breadcrumb) 2021-04-07 22:25:51 +02:00
3abadf2477 🐛 (overlay) fix scroll flash 2021-03-16 00:02:37 +01:00
acf54f7a86 📱 (note) 2021-03-15 23:41:34 +01:00
Julien Calixte
d624e064af ♻️ (scroll) 2021-03-14 21:27:51 +01:00
Julien Calixte
23a310f986 (stacked notes) smooth scroll to focused note 2021-03-14 21:11:06 +01:00
698c865b39 (stacked notes) implements overlay 2021-03-14 15:21:45 +01:00