Skip to content

Commit

Permalink
fix(field-label): updated conditions to apply target labels on focusa…
Browse files Browse the repository at this point in the history
…ble elements
  • Loading branch information
Tarun Tomar committed Jul 19, 2023
1 parent 2ea43f3 commit a310b26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/field-label/src/FieldLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ export class FieldLabel extends SizedMixin(SpectrumElement) {
const applyLabel = this.target.applyFocusElementLabel;
const focusable = this.target.focusElement || this.target;
const targetParent = focusable.getRootNode() as HTMLElement;

if (typeof applyLabel !== 'undefined') {
applyLabel(this.labelText);
} else if (targetParent === (this.getRootNode() as HTMLElement)) {
}
if (targetParent === (this.getRootNode() as HTMLElement)) {
const conditionAttribute = target
? conditionAttributeWithId
: conditionAttributeWithoutId;
Expand Down

0 comments on commit a310b26

Please sign in to comment.