2
0
Эх сурвалжийг харах

Merge pull request #9735 from kkthxbye-code/fix-9734

Fixes #9734 & #9713 - Only set focus on select field search boxes if the select is open
Jeremy Stretch 3 жил өмнө
parent
commit
b9dd654e7a

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
netbox/project-static/dist/netbox.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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);
     }
   }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно