From 6e7b7c2340339a15b21857ee1fbc734a5760135d Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Thu, 4 Jan 2024 11:22:23 -0800 Subject: [PATCH] Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox (#2478) --- .changeset/smart-insects-cheat.md | 5 +++++ app/components/primer/alpha/action_bar_element.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/smart-insects-cheat.md diff --git a/.changeset/smart-insects-cheat.md b/.changeset/smart-insects-cheat.md new file mode 100644 index 0000000000..8cf0aadc97 --- /dev/null +++ b/.changeset/smart-insects-cheat.md @@ -0,0 +1,5 @@ +--- +"@primer/view-components": patch +--- + +Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox diff --git a/app/components/primer/alpha/action_bar_element.ts b/app/components/primer/alpha/action_bar_element.ts index b6d518892f..d857fec165 100644 --- a/app/components/primer/alpha/action_bar_element.ts +++ b/app/components/primer/alpha/action_bar_element.ts @@ -50,7 +50,13 @@ class ActionBarElement extends HTMLElement { resizeObserver.observe(this) instersectionObserver.observe(this) - requestAnimationFrame(() => this.update()) + requestAnimationFrame(() => { + // This overflow visible is needed for browsers that don't support PopoverElement + // to ensure the menu and tooltips are visible when the action bar is in a collapsed state + // once popover is fully supported we can remove this.style.overflow = 'visible' + this.style.overflow = 'visible' + this.update() + }) } disconnectedCallback() {