Browse Source

UI: Only set focus on select field search boxes if the select is open

kkthxbye-code 3 năm trước cách đây
mục cha
commit
b0df24e6d1

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
netbox/project-static/dist/netbox.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
netbox/project-static/dist/netbox.js.map


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

@@ -411,7 +411,12 @@ export class APISelect {
     } finally {
       this.setOptionStyles();
       this.enable();
-      this.slim.slim.search.input.focus();
+
+      // Set the focus to the search field if the select is open
+      if (this.slim.slim.content.classList.contains("ss-open")) {
+        this.slim.slim.search.input.focus();
+      }
+
       this.base.dispatchEvent(this.loadEvent);
     }
   }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác