Skip to content

Commit

Permalink
Rename 'popover' to fix Chrome 114 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamorse committed May 31, 2023
1 parent ed398c4 commit f774b98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/components/bolt-popover/src/popover.js
Expand Up @@ -28,7 +28,7 @@ class BoltPopover extends BoltElement {
disconnectedCallback() {
super.disconnectedCallback && super.disconnectedCallback();

this.popover?.hide();
this.tippyInstance?.hide();
}

getPaddingTop() {
Expand Down Expand Up @@ -75,7 +75,7 @@ class BoltPopover extends BoltElement {
: document.body;

// Note: trigger cannot not be a shadow DOM element or Tippy doesn't always hide properly
this.popover = tippy(this.trigger, {
this.tippyInstance = tippy(this.trigger, {
content: this.content,
placement: this.placement || schema.properties.placement.default,
trigger: this.triggerEvent === 'hover' ? 'mouseenter click' : 'click',
Expand Down Expand Up @@ -173,7 +173,7 @@ class BoltPopover extends BoltElement {
// close popover when inner action is clicked
for (const innerAction of this.content.querySelectorAll('a, button')) {
innerAction.addEventListener('click', () => {
this.popover?.hide();
this.tippyInstance?.hide();
});
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/bolt-tooltip/src/tooltip.js
Expand Up @@ -26,7 +26,7 @@ class BoltTooltip extends BoltElement {
disconnectedCallback() {
super.disconnectedCallback && super.disconnectedCallback();

this.popover?.hide();
this.tippyInstance?.hide();
}

getPaddingTop() {
Expand Down Expand Up @@ -73,7 +73,7 @@ class BoltTooltip extends BoltElement {
: document.body;

// Note: trigger cannot not be a shadow DOM element or Tippy doesn't always hide properly
this.popover = tippy(this.trigger, {
this.tippyInstance = tippy(this.trigger, {
content: this.content,
placement: this.placement || schema.properties.placement.default,
trigger: 'mouseenter focus', // To help debug styles set to 'click'
Expand Down

0 comments on commit f774b98

Please sign in to comment.