Skip to content

Date picker Popover isn't collapsing during click outside the popover #6070

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

Closed
Mohamed02 opened this issue Mar 18, 2024 · 3 comments
Closed
Labels
waiting Waiting on Issue Author

Comments

@Mohamed02
Copy link

Provide a general summary of the issue here

Date picker Popover isn't collapsing during click onside the popover when "isNonModal" is set to true

🤔 Expected Behavior?

Even when "isNonModal" is true, the Calendar Popover must close/collapse when the user clicks outside the calendar .

😯 Current Behavior

when "isNonModal" is true, the Calendar Popover isnt closing when the user clicks outside the calendar . Alternatively user has to scroll the page or select a date in order to collapse the popover.

In addtiion to this , even the function shouldCloseOnInteractOutside is also not getting triggered when the user click outside the calendar

💁 Possible Solution

Option1: Allow page scrolling when - isNonModal not set,
Option 2: if Option #1 is not feasible, calendar has to be collapsed when clicked outside the Calendar. and not during scroll ( when isNonModal is true)
Option 3: If Option #1 & #2 are not feasible then trigger shouldCloseOnInteractOutside when user clicks outside the calendare( when isNonModal is true)

🔦 Context

No response

🖥️ Steps to Reproduce

Try examples on https://react-spectrum.adobe.com/react-aria/DateField.html

Version

1.1.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@LFDanLu
Copy link
Member

LFDanLu commented Mar 18, 2024

#5338 is related. However, can you go into more detail as to why you are applying isNonModal to your DatePicker's Popover? That is used for ComboBox since focus remains on the input when the dropdown is opened but shouldn't be the case for DatePicker.

@LFDanLu LFDanLu added the waiting Waiting on Issue Author label Mar 18, 2024
@Mohamed02
Copy link
Author

Mohamed02 commented Mar 19, 2024

without setting the property - isNonModal, the page looks frozen (unable to scroll) when Popover is in expanded mode.

@LFDanLu
Copy link
Member

LFDanLu commented Mar 19, 2024

The popover's not scrolling when open is intentional (see #2926 and #5126 (comment)). You shouldn't apply isNonModal just to get around this restriction since that prop has changes to accessibility behavior that isn't suitable in many cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on Issue Author
Projects
None yet
Development

No branches or pull requests

2 participants