Skip to content

Commit

Permalink
Merge pull request #245 from primer/pk/anchor-changeset
Browse files Browse the repository at this point in the history
Trivial commit
  • Loading branch information
pksjce committed Nov 16, 2023
2 parents b0e58a0 + caf30c4 commit cdf2ebd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit cdf2ebd

Please sign in to comment.