Browse Source

UI: Fix apiSelect scrolling while zoomed in chrome

kkthxbye-code 3 years ago
parent
commit
a91c46b4c0

File diff suppressed because it is too large
+ 0 - 0
netbox/project-static/dist/netbox.js


File diff suppressed because it is too large
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 2 - 1
netbox/project-static/src/select/api/apiSelect.ts

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

Some files were not shown because too many files changed in this diff