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

Polaris docs Patterns section date-picking/date-range demo, open picker popover and switch input will hidden popover #11955

Open
moonou opened this issue Apr 29, 2024 · 0 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@moonou
Copy link

moonou commented Apr 29, 2024

Summary

In the demo code, when the input blur event is triggered, it will use the InlineGrid ref to check if the target element exists in the Popover.

https://github.com/Shopify/polaris/blob/main/polaris.shopify.com/content/patterns/date-picking/variants/date-range.mdx?plain=1#L189

https://github.com/Shopify/polaris/blob/main/polaris.shopify.com/content/patterns/date-picking/variants/date-range.mdx?plain=1#L286

And I think the InlineGrid ref is undefined because the ref prop is not mentioned in the InlineGrid docs, or the ref prop was removed from InlineGrid in a historical change.
Maybe React updated some ref API recently, which affected the ref check in the demo code.

Expected behavior

switch to another input keep popover opening

Actual behavior

switch to another input will close popover

Steps to reproduce

image

Are you using React components?

None

Polaris version number

13.2.0

Browser

Microsoft Edge

Device

macOS 14.1.2

@moonou moonou added Bug Something is broken and not working as intended in the system. untriaged labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant