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

[Scheduler] CurrentTimeMarker causes horizontal scrollbar

Open cheng93 opened this issue 3 years ago • 0 comments

Describe the bug When the presentation table has width of xxx.5px a horizontal scroll bar is shown across the bottom of the scheduler

To Reproduce https://stackblitz.com/edit/angular-hwex83?file=src%2Fapp%2Fapp.component.ts

Expected behavior No horizontal scroll bar

Screenshots If applicable, add screenshots to help explain your problem. image

image

You can see that k-current-time has width 909px, and the table has witdh 908.5.

I assume the horizontal scroll bar appears when the difference in width is greater than 0.5px

Browser Chrome and Edge

Resolution 2560x1440 with 100% scale

To reproduce you may need to change the size of the scheduler

Solution

in positionCurrentTime() in DayTimeViewComponent

You have const tableWidth = this.contentTable.nativeElement.clientWidth;

https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth

states that clientWidth rounds to an integer.

A better solutoin would be to use getBoundingClientRect().width

cheng93 avatar Jul 25 '22 16:07 cheng93