@1024pix/pix-ui 47.0.2 → 47.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,10 @@ export default class PixSelect extends Component {
37
37
  element.style.setProperty('--pix-select-width', `${selectWidth}rem`);
38
38
  });
39
39
  }
40
+
41
+ this.elementHelper.waitForElement(`container-${this.selectId}`).then((element) => {
42
+ this.rootElement = element;
43
+ });
40
44
  }
41
45
 
42
46
  get displayDefaultOption() {
@@ -151,11 +155,11 @@ export default class PixSelect extends Component {
151
155
  focus() {
152
156
  if (this.isExpanded) {
153
157
  if (this.args.value) {
154
- document.querySelector("[aria-selected='true']").focus();
158
+ this.rootElement.querySelector("[aria-selected='true']").focus();
155
159
  } else if (this.args.isSearchable) {
156
160
  document.getElementById(this.searchId).focus();
157
161
  } else if (this.displayDefaultOption) {
158
- document.querySelector("[aria-selected='true']").focus();
162
+ this.rootElement.querySelector("[aria-selected='true']").focus();
159
163
  }
160
164
  }
161
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "47.0.2",
3
+ "version": "47.0.3",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"