Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[grid] Scrollbar jumps to start after resizing column beyond viewport #3586

Open
web-padawan opened this issue Mar 21, 2022 · 0 comments
Open

Comments

@web-padawan
Copy link
Member

web-padawan commented Mar 21, 2022

Description

Originally reported at #3566 (comment) but seems not specific to that feature.

This issue can be observed with a grid that has resizable column:

<script type="module">
  import '@vaadin/grid/all-imports';
  import { users } from '@vaadin/grid/test/visual/users.js';

  const grid = document.querySelector('vaadin-grid');
  grid.items = users;
</script>

<vaadin-grid style="max-width: 600px">
  <vaadin-grid-column-group header="name">
    <vaadin-grid-column path="name.first" width="120px" flex-shrink="0"></vaadin-grid-column>
    <vaadin-grid-column path="name.title"></vaadin-grid-column>
  </vaadin-grid-column-group>
  <vaadin-grid-column path="location.city" width="200px" resizable flex-shrink="0"></vaadin-grid-column>
  <vaadin-grid-column path="location.state" width="200px" resizable flex-shrink="0"></vaadin-grid-column>
  <vaadin-grid-column path="location.zip" resizable></vaadin-grid-column>
</vaadin-grid>
  1. Resize the "State" column several times to make it wide enough
  2. Scroll using touchpad so that left edge of "State" column gets out of the viewport
  3. Click the horizontal scrollbar after scrolling the grid the last time
grid-resize-scroll.mp4

Expected outcome

Scrollbar remains where it is.

Actual outcome

Scrollbar jumps to the beginning (first column).

Environment

  • Vaadin 23

Browsers affected

  • Chrome
  • Firefox
  • Safari
@web-padawan web-padawan changed the title [grid] Scrollbar jumps to the beginning after resizing column beyond viewport [grid] Scrollbar jumps to start after resizing column beyond viewport Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant