nextcloud / text

📑 Collaborative document editing using Markdown
GNU Affero General Public License v3.0
556 stars 92 forks source link

Image loading moves text #4242

Open provokateurin opened 1 year ago

provokateurin commented 1 year ago

Describe the bug I have a long document with many images. When I scroll to the bottom it loads all the images, but then the whole text scrolls because the images are bigger than their placeholders. I have to scroll to the bottom again.

To Reproduce Steps to reproduce the behavior:

  1. Long document with many images
  2. Open document, scroll to the bottom
  3. Wait for the images to load
  4. Text moves up

Expected behavior I should still be at the bottom of the document

Client details:

Server details **Text app version:** 3.7.2 **Operating system:** Alpine Linux **Web server:** Nginx **Database:** Postgres **PHP version:** 8.2 **Nextcloud version:** 26.0.2
blizzz commented 1 year ago

@provokateurin Not sure I see the same behaviour that you see. Could you perhaps do a quick screenrecording?

For me, pictures load sort of instantly, but when opening the editor I am somewhere in the middle, and certainly not where the cursor is – always at the end.

provokateurin commented 1 year ago

Sure, my document has about 250 images so they don't load that instantly :D

when opening the editor I am somewhere in the middle, and certainly not where the cursor is – always at the end.

Sorry, I don't understand what you mean. Can you explain it a little bit?

blizzz commented 1 year ago

when opening the editor I am somewhere in the middle, and certainly not where the cursor is – always at the end.

Sorry, I don't understand what you mean. Can you explain it a little bit?

When I open my test document with text, the visible area shows some middle part of the document. The cursors however, is placed at the end of the document and as such is not visible. Moving the curse by key stroke scrolls down to the bottom of the document.

provokateurin commented 1 year ago

https://github.com/nextcloud/text/assets/26026535/5ec9b42e-e4d0-49c5-9687-eb325229e4bc

I only scroll when my mouse is on the right side, the scrolling up is due to the images loading

juliusknorr commented 8 months ago

With files metadata we could reserve space for the image if the size is known https://github.com/nextcloud/photos/issues/2243