kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

[Grid] scrolling vertically causes unexpected behavior

Open svetq opened this issue 5 years ago • 9 comments

Describe the bug When using a navigable Grid with virtual scrolling or virtual columns and the active cell of the Grid is not visible (the Grid is scrolled horizontally) then on scrolling vertically the Grid will move automatically the horizontal scrollbar.

To Reproduce Check the following example: Virtual scrolling - https://stackblitz.com/edit/angular-4hs2lm?file=app/app.component.ts Virtual columns - https://stackblitz.com/edit/angular-4fscm7?file=src%2Fapp%2Fapp.component.ts

  1. Click a cell from the first "Product Name" column in order to focus it.
  2. Scroll horizontally to the last column.
  3. Scroll vertically. chrome_dsvszWaXYm

Workaround If applicable, add screenshots to help explain your problem.

Browser

  • OS: [for example, iOS]
  • Browser [for example, Chrome, Safari]
  • Version [for example, 22]

Additional context Add any other context about the problem here.

svetq avatar Jun 19 '19 11:06 svetq

Also reported in thread 1555403

Raisolution avatar Mar 15 '22 12:03 Raisolution

Facing similar issue. Any update on when this issue may be addressed?

mclear01 avatar Jun 13 '22 16:06 mclear01

Facing similar issue for a possible another scenario i.e. when adding a column dynamically to the grid the horizontal scrollbar shifts towards right when navigable set to true or even false.

naveedsheikh2304 avatar Aug 01 '22 13:08 naveedsheikh2304

+1

shivambindal93 avatar Oct 27 '22 14:10 shivambindal93

Work around capture the contentScroll event and move the focus out of the grid to a dummy element outside the grid.

https://angular-4fscm7-my8kfm.stackblitz.io

Kir4n avatar Dec 02 '22 13:12 Kir4n

Work around capture the contentScroll event and move the focus out of the grid to a dummy element outside the grid.

https://angular-4fscm7-my8kfm.stackblitz.io

I have checked this solution but still not working for me.

ankurgupta12 avatar Jan 06 '23 08:01 ankurgupta12

Worst case comment out the cursor change event subscription altogether till it gets fixed by Kendo team. Setting Navigable to false also will do but then you will loose any navigability.

Find the following line in node_modules@progress\kendo-angular-grid\fesm2015\kendo-angular-grid.js

this.subs.add(this.cursor.changes
            .subscribe(args => this.onCursorChanges(args)));

Comment it out.

Please not that angular cache needs to be cleaned for the change to take effect. You can verify this by inspecting the Kendo grid source in browser.

Kir4n avatar Jan 06 '23 08:01 Kir4n

Worst case comment out the cursor change event subscription altogether till it gets fixed by Kendo team. Setting Navigable to false also will do but then you will loose any navigability.

Find the following line in node_modules@progress\kendo-angular-grid\fesm2015\kendo-angular-grid.js

this.subs.add(this.cursor.changes
            .subscribe(args => this.onCursorChanges(args)));

Comment it out.

Please note that the angular cache needs to be cleaned for the change to take effect. You can verify this by inspecting the Kendo grid source in the browser.

tried updating the function definition in the ngAfterViewInit hook, the fix works only when the virtualColumns property when the same is marked as "true", but has side effects, as navigation sometimes fails. Adding the code below and stack-blitz link for same

code link ->https://stackblitz.com/edit/angular-4fscm7-vjak6f?file=src/app/app.component.ts application link ->https://angular-4fscm7-vjak6f.stackblitz.io

if (this.kendoGrid && this.kendoGrid.navigationService) { this.kendoGrid.navigationService.onCursorChanges = () => {}; }

cc @mclear01 @naveedsheikh2304

shivambindal93 avatar Feb 16 '23 10:02 shivambindal93

any solution for this issue?

manoj-bheemireddy avatar Feb 26 '24 09:02 manoj-bheemireddy

Fixed in v15.4.0 of kendo-angular-grid package.

slavenai avatar Apr 09 '24 13:04 slavenai