Skip to content

Commit

Permalink
Merge pull request #216 from infor-design/201-ids-input-autofocus-on-…
Browse files Browse the repository at this point in the history
…change-fix

209 - fix ids-input grabbing focus on each value set
  • Loading branch information
tmcconechy committed Jun 18, 2021
2 parents 12882dc + 60bf194 commit 00fce74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ids-input/ids-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,15 @@ class IdsInput extends mix(IdsElement).with(...appliedMixins) {
super.connectedCallback?.();

this.handleEvents();
this.handleAutoselect();
this.handleClearable();
this.handleDirtyTracker();
// @ts-ignore
this.handleValidation();

/* istanbul ignore next */
if (this.hasAttribute(props.AUTOSELECT)) {
this.handleAutoselect();
}
}

/**
Expand Down Expand Up @@ -733,7 +737,6 @@ class IdsInput extends mix(IdsElement).with(...appliedMixins) {
this.setAttribute(props.VALUE, v);
if (this.input?.value !== v) {
this.input.value = v;
['focus', 'blur', 'focus'].forEach((m) => this.input[m]());
this.input.dispatchEvent(new Event('change', { bubbles: true }));
}
}
Expand Down

0 comments on commit 00fce74

Please sign in to comment.