Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivial commit #245

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilled-cougars-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/behaviors": patch
---

When zoomed in, an overlay floating element should anchor itself properly instead of getting the top part cut off in the process
2 changes: 1 addition & 1 deletion src/__tests__/anchored-position.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ describe('getAnchoredPosition', () => {
expect(left).toEqual(380) // anchorRect.left + anchorRect.width - parentRect.left - floatingRect.width
})

// This test runs for values derived from a real use case https://github.com/github/accessibility-audits/issues/4515 as run on a local storybook.
// This test runs for values derived from a real use case https://github.com/github/accessibility-audits/issues/4515 as seen on a local storybook.
it('should overflow to bottom if the element is too tall to fit on the screen when zoomed', () => {
const parentRect = makeDOMRect(0, 0, 400, 400)
const anchorRect = makeDOMRect(16, 16, 32, 32) // left aligned button
Expand Down
Loading