Skip to content

Commit

Permalink
fix(ld-tooltip): rename property id in order to prevent dom exception
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Aug 26, 2021
1 parent 69d6447 commit b623b18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/liquid/components/ld-tooltip/ld-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class LdTooltip {
@State() visible = false

private delayTimeout?: NodeJS.Timeout
private id = `ld-tooltip-${++tooltipCount}`
private idDescriber = `ld-tooltip-${++tooltipCount}`
private popper?: Tether
private tooltipRef!: HTMLDivElement
private triggerRef!: HTMLSpanElement
Expand Down Expand Up @@ -207,7 +207,7 @@ export class LdTooltip {
return (
<Host>
<button
aria-describedby={this.id}
aria-describedby={this.idDescriber}
class={getClassNames([
'ld-tooltip__trigger',
this.triggerType === 'click' && 'ld-tooltip__trigger--clickable',
Expand Down Expand Up @@ -252,7 +252,7 @@ export class LdTooltip {
this.hasDefaultTrigger && 'ld-tooltip--with-default-trigger',
this.triggerType === 'click' && 'ld-tooltip--interactive',
])}
id={this.id}
id={this.idDescriber}
ref={(element) => {
this.tooltipRef = element
}}
Expand Down

0 comments on commit b623b18

Please sign in to comment.