MacDownApp / MacDownApp/macdown

Minor issue: manual refresh (with ⌘+R) doesn't remember the preview scroll position with mouse scroll wheel

Open
#1,254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

This is a problem only with mouse scroll wheels. Trackpads aren't affected and there is an inconvenient workaround for mice too.

I use the latest version of MacDown (0.7.3) with the following features turned off for better performance:

- Update preview automatically as you type
- Sync preview scrollbar when editor scrolls

I refresh the preview manually with ⌘+R. Normally this feature remembers the vertical scroll position of the preview pane and scrolls back there after the refresh. This behavior is essential in case of documents that are longer than a couple pages. It works perfectly with trackpads but with a mouse it doesn't work when the preview pane is scrolled with the scroll wheel (which is the easiest and most natural method).

With a mouse the "last remembered position" (to be used after refresh) is saved only when the preview is scrolled by grabbing the scrollbar directly. This workaround is quite inconvenient (since the scroll bar is small and isn't even visible by default) so I switched back to trackpad after figuring out the reasons.

Contributor guide

Open the contributing guide

Research direction

Reproduce this in MacDown 0.7.3 with automatic preview updates and preview scrollbar syncing disabled: scroll the preview with a mouse wheel, then press ⌘+R. Trace the preview scroll-position handling and compare it with scrollbar dragging and trackpad scrolling. Done means a mouse-wheel-scrolled position is restored after manual refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, objective-c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.