소스 검색

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

kkthxbye-code 3 년 전
부모
커밋
b0df24e6d1
3개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      netbox/project-static/dist/netbox.js
  2. 0 0
      netbox/project-static/dist/netbox.js.map
  3. 6 1
      netbox/project-static/src/select/api/apiSelect.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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);
     }
   }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.