1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

UI: Fix apiSelect scrolling while zoomed in chrome

This commit is contained in:
kkthxbye-code
2022-04-22 20:33:46 +02:00
parent 8315883db9
commit a91c46b4c0
3 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -570,8 +570,9 @@ export class APISelect {
* additional paginated options.
*/
private handleScroll(): void {
// Floor scrollTop as chrome can return fractions on some zoom levels.
const atBottom =
this.slim.slim.list.scrollTop + this.slim.slim.list.offsetHeight ===
Math.floor(this.slim.slim.list.scrollTop) + this.slim.slim.list.offsetHeight ===
this.slim.slim.list.scrollHeight;
if (this.atBottom && !atBottom) {