BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.06k stars 1.47k forks source link

Strange scrolling behaviour in preview mode with images #2886

Open MaaadMax opened 5 years ago

MaaadMax commented 5 years ago

Current behavior

I use the markdown mode and the preview mode side by side. Normally the preview shows me the text I am writing in the markdown mode. But when I have some big images included and write something at the end of the mardown file, the preview mode shows me the beginning of the markdown file.

Expected behavior

I expect that the preview mode automatically scrolls to the point where my cursor is located. So it doesn't matter if images are included and how big they are.

Steps to reproduce

  1. Create a file with normal text at the beginning
  2. Insert some images which are in total higher than the preview view
  3. Scroll down to the bottom of the markdown file and write some new text

Environment

christopherMills commented 5 years ago

For me, as soon as images are added, the preview pane lags behind the editor pane. In other words, you can be writing on the final line of the editor pane, but the preview pane will be focused on somewhere above that.

The only temporary fix is to escape the image tags in the .md and unescape when you're finished editing the file.

Flexo013 commented 5 years ago

@MaaadMax @christopherMills Is the issue still present as described in the original post or has that been fixed? I recall that one of the more recent builds had a fix for the scrolling to the top problem when images were present.

As for the lagging behind: Maybe this is worth its own separate issue; even though both issues are related to images and scrolling. I suspect that jumping to the beginning and not syncing up after images is caused by two slightly different (but related) things.

christopherMills commented 5 years ago

@Flexo013 I was on version 0.11.something (the version on Ubuntu Software App Store is out of date), now installed version 0.12.1 and it presents exactly the same behaviour. Shucks.

I use 200% scaling (HiDPI monitors) and initially thought that might be the issue but it also persists when the Ubuntu system scaling is set to 100%. It also persists when I am undocked and using just my ThinkPad's screen on its own.

Once I escape the image tag, alright, the preview pane still doesn't sync perfectly, but at least it is stable and I can see what I am typing. Without the escape tag, the program becomes essentially unusable, so I politely express my opinion that this bug is an order of magnitude greater than the panes not being aligned perfectly

Flexo013 commented 5 years ago

The PR #3177 should fix the scrolling to the beginning of the note. I will do some more investigating into the scrolling desync issue once I get back to my desktop.

ameinel commented 5 years ago

Hello, I have observed the same behavior as initially described by MaaadMax on 15 Feb. If I remove the images from the file, the behavior is fine and no more jumping to the first section of the markdown.

I am using Boostnote version 0.12.1 with OS Darwin x64 18.7.0

Flexo013 commented 5 years ago

@ameinel We are aware of this issue, see #3023. The fix for this is ready and will be part of the next release.