Skip to content

Commit

Permalink
Bug fix in ActionBar: When collapsed the menu and tooltips aren't vis…
Browse files Browse the repository at this point in the history
…ible in Firefox (primer#2478)
  • Loading branch information
jonrohan authored Jan 4, 2024
1 parent 0a2c508 commit 6e7b7c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-insects-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox
8 changes: 7 additions & 1 deletion app/components/primer/alpha/action_bar_element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 6e7b7c2

Please sign in to comment.