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 column reordering error when cursor leaves the browser. #7687

Open
nSharifA opened this issue Aug 22, 2024 · 1 comment
Open

Grid column reordering error when cursor leaves the browser. #7687

nSharifA opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working Impact: Low Severity: Minor V14 only Issue is only valid for Vaadin 14 vaadin-grid

Comments

@nSharifA
Copy link

nSharifA commented Aug 22, 2024

Description

I wanted to move the last grid column to first position, while doing that cursor left the browser for a moment and I got a javascript error at the top right corner: "TypeError: Cannot read properties of null (reading '_column')"

Full console stacktract:

vaadin-grid-column-reordering-mixin.js:255 Uncaught TypeError: Cannot read properties of null (reading '_column')
    at GridElement._cellFromPoint (vaadin-grid-column-reordering-mixin.js:255:18)
    at GridElement._onTrack (vaadin-grid-column-reordering-mixin.js:166:29)
    at GridElement._onTrackEvent (vaadin-grid-column-reordering-mixin.js:121:12)
    at _fire (gestures.js:682:87)
    at trackFire (gestures.js:982:3)
    at HTMLDocument.movefn (gestures.js:879:11)

Video:
https://github.com/user-attachments/assets/6cfa169d-3664-4e7f-9bd0-82a22f4156a4

Expected outcome

no error

Minimal reproducible example

public class TestUI extends VerticalLayout {

  public TestUI() {

    Grid<List<String>> a = new Grid();
    a.setItems(Arrays.asList(""));
    add(a);
    a.addColumn( l -> "A").setHeader("A").setWidth("200px");
    a.addColumn( l -> "B").setHeader("B").setWidth("200px");
    a.addColumn( l -> "C").setHeader("C").setWidth("200px");
    a.setColumnReorderingAllowed(true);
    a.setSizeFull();
    setSizeFull();
    
  }
}

Steps to reproduce

  1. add the snipet
  2. make the browser smaller.
  3. drag the last column to the first position, leave the browser with the cursor while doing that

Environment

Vaadin version(s): 14.10.11
OS: Windows10

Browsers

Chrome

@yuriy-fix yuriy-fix added bug Something isn't working Severity: Minor Impact: Low vaadin-grid V14 only Issue is only valid for Vaadin 14 labels Aug 22, 2024
@yuriy-fix
Copy link
Contributor

The issue seems to be fixed on the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Impact: Low Severity: Minor V14 only Issue is only valid for Vaadin 14 vaadin-grid
Projects
None yet
Development

No branches or pull requests

2 participants