Skip to content

Commit

Permalink
fix(tooltip): only update tooltip content if original element content…
Browse files Browse the repository at this point in the history
… has changed
  • Loading branch information
tobyzerner committed Jun 11, 2023
1 parent 587de3b commit 62ad220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export default class TooltipElement extends HTMLElement {
this.showing = true;
}

if (tooltip.innerHTML !== this.innerHTML) {
tooltip.innerHTML = this.innerHTML;
if (this.innerHTML !== this.prevInnerHTML) {
this.prevInnerHTML = tooltip.innerHTML = this.innerHTML;
}

tooltip.style.position = 'absolute';
Expand Down

0 comments on commit 62ad220

Please sign in to comment.