Skip to content

Commit 6e7b7c2

Browse files
authored
Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox (#2478)
1 parent 0a2c508 commit 6e7b7c2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/smart-insects-cheat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/view-components": patch
3+
---
4+
5+
Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox

app/components/primer/alpha/action_bar_element.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ class ActionBarElement extends HTMLElement {
5050
resizeObserver.observe(this)
5151
instersectionObserver.observe(this)
5252

53-
requestAnimationFrame(() => this.update())
53+
requestAnimationFrame(() => {
54+
// This overflow visible is needed for browsers that don't support PopoverElement
55+
// to ensure the menu and tooltips are visible when the action bar is in a collapsed state
56+
// once popover is fully supported we can remove this.style.overflow = 'visible'
57+
this.style.overflow = 'visible'
58+
this.update()
59+
})
5460
}
5561

5662
disconnectedCallback() {

0 commit comments

Comments
 (0)