CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.87k stars 706 forks source link

Zooming out has a layout jump #8788

Open juliusknorr opened 7 months ago

juliusknorr commented 7 months ago

Describe the Bug

When zooming out using the touchpad or using ctrl-scroll the position of the document changes

Steps to Reproduce

  1. Zoom in
  2. Move the cursor to the left or right part of the document area
  3. Zoom out using Ctrl-Scroll or the touchpad

Expected Behavior

The document just zooms out and directly is in the center target position

Actual Behavior

The document is first zoomed out in the right side of the browser window and then there is a layout jump where it is centered

Screenshots

writer-zoom-out-jumping.webm

Additional Context

COOLWSD version: 24.04.1.2 (git hash: 85fc0fd8) LOKit version: Collabora Office 24.04.1.2 (git hash: da505b6) Served by: Arch Linux Server ID: 7d563b2f

juliusknorr commented 7 months ago

I also noticed a very small layout shift when zooming in with ctrl-scroll/touchpad, sometimes more sometimes less, but there is a slight jump between stopping the zooming and when the actual higher resolution tiles are rendered

writer-zoom-jumping.webm

juliusknorr commented 7 months ago

This is also visible with the zoom buttons, small papercut issue there would be that you have to wait until the zoom action was performed and cannot easily click multiple times to zoom in a couple of times:

writer-zoom-jumping-2.webm

writer-zoom-click-fast.webm

pedropintosilva commented 6 months ago

Today's discussion:

eszkadev commented 6 months ago

We could do it also this way: a) when document width is completely visible on the screen -> zoom out with document at the center b) when document width is visible partially (large zoom level or small window):

juliusknorr commented 6 months ago

a) when document width is completely visible on the screen -> zoom out with document at the center

Note that this seems to be already the case, just not once you start zooming out with scenario (b)