这是indexloc提供的服务,不要输入任何密码
Skip to content

Alternate overflow options #318

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Alternate overflow options #318

merged 1 commit into from
Apr 24, 2025

Conversation

jamesnw
Copy link
Contributor

@jamesnw jamesnw commented Apr 14, 2025

Description

Overflow checking was not working as expected for position-try-fallbacks with the viewport as the containing block.

Related Issue(s)

#317

Steps to test/reproduce

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for anchor-polyfill ready!

Name Link
🔨 Latest commit 67ba80e
🔍 Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/67fd65ae47f13d000856fc81
😎 Deploy Preview https://deploy-preview-318--anchor-polyfill.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for anchor-position-wpt canceled.

Name Link
🔨 Latest commit 67ba80e
🔍 Latest deploy log https://app.netlify.com/sites/anchor-position-wpt/deploys/67fd65aec5379b00083bc38a

strategy: 'absolute',
} as unknown as MiddlewareState,
{
boundary: offsetParent,
rootBoundary: 'document',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As context, if I recall correctly, I was being overly explicit in this call, but it turns out these options are not always correct, and the defaults are actually what we want.

@jamesnw jamesnw requested a review from jgerigmeyer April 16, 2025 15:54
Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me!

Probably unrelated, but I notice in my Chromium browser (no polyfill) that the last successful fallback "sticks" even if scrolled to allow a prior fallback to no longer overflow. Is that a bug, or a change in the spec?

@jamesnw
Copy link
Contributor Author

jamesnw commented Apr 21, 2025

Probably unrelated, but I notice in my Chromium browser (no polyfill) that the last successful fallback "sticks" even if scrolled to allow a prior fallback to no longer overflow. Is that a bug, or a change in the spec?

I've noticed this as well. I opened #325 to track this.

@jgerigmeyer jgerigmeyer merged commit 8bd0e2e into main Apr 24, 2025
14 checks passed
@jgerigmeyer jgerigmeyer deleted the fallback-viewport branch April 24, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Page offset from anchor is applied to popover on iOS 15.6 [BUG] Fallbacks not triggered with the viewport as the containing block
2 participants