Open RamonDonadeu opened 1 year ago
Seems to be related to https://github.com/quasarframework/quasar/issues/14450, but this happens when the QTable gets focus. I'll take a look
I'm not sure there is something automatic that can be done (looking into it)
But it can be fixed in CSS (add scroll-margin-top
equal to the size of the sticky on top)
The same should be true for sticky on left
https://codepen.io/pdanpdan/pen/vYzVOBd
Okay I'll do that. Thanks!
Please keep this open until i can check if something automatic can be done
I'm working on a QTable virtual scroll issue atm, and going through all the open tickets. Just to note, in case it's important, I only see this specific problem in Chrome (116) and not in Firefox (113), both on Windows.
I work on Mac, And it also happens in Chrome and in Safari. Also recently I found out, that if table is bigger than window height, it scrolls one row up under the TH, and also the entire table is scrolled upwards too.
I had a similar problem only happening in safari where I had a dialog container hidden on the bottom of the page, and when using context menu inside table. Also scrolled the q-layout under q-header. Removing that dialog container solved the problem, but it was in "position: Absolute" So it should not be interpreted as it was using screen space. Even Inspecting the browser showed that the layout was not reaching the bottom of the page, and nothing was occupying that space.
Just to add my case, the scrolling also happens when using a Qmenu in the QTable header slot. Clicking on the menu content itself or its anchor element, only when the menu closes. Clicking outside does not trigger the srolling side-effect.
What happened?
I have a long QTable with virtual scroll enabled, and each row has some options set in a QMenu component inside "Body" Slot. So When on the top of the table, user click on right mouse button to open the menu, and then click on an option, the table rows are scrolled, 1 row unit, to the top, so the first row gets under the header of the table. I tested it, and the problem is the virtual-table option, without it the bug won't reproduce.
What did you expect to happen?
To not scroll automatically one row.
Reproduction URL
https://codepen.io/RamonDonadeu/pen/wvEYvZq?editors=111
How to reproduce?
1.- Go to providen link 2.- Make sure you are on the top of the table. 3.- Right click in any row of the table 4.- Then you can reproduce it with diferent actions: 4.1- Click on an option of the menu, in this case 'Test' 4.2- Left click again the same row 4.3- Right click in the same row.
Now the Table should have scrolled up one row. The issue is not reproduced if you right click to open the menu, and then click on any other row different than the clicked before. Or, if you are not at the top of the table.
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar)
Platforms/Browsers
Chrome, Brave Safari
Not tested in Firefox but I suppose it will be te same
Quasar info output
Relevant log output
No response
Additional context
No response