FIX: do not focus after search if dropdown is collapsed (#14118)

FIX: do not focus after search if dropdown is collapsed (#14118)

diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js
index d74d483..1e46a4b 100644
--- a/app/assets/javascripts/select-kit/addon/components/select-kit.js
+++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js
@@ -683,8 +683,10 @@ export default Component.extend(
           });
 
           this._safeAfterRender(() => {
-            this.popper && this.popper.update();
-            this._focusFilter();
+            if (this.selectKit.isExpanded) {
+              this.popper && this.popper.update();
+              this._focusFilter();
+            }
           });
         })
         .finally(() => {

GitHub sha: 691d1bde54646259a8493e72008700e30dc2d234

This commit appears in #14118 which was approved by pmusaraj. It was merged by jjaffeux.