-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[added] Enable rootClose for OverlayTrigger #698
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
Conversation
It may be worth noting as a warning that the hover option alone may not meet accessibility requirements since there is no way for a keyboard user to see the popover. Also, hover does not play well with mobile touch screen users since you can hover your finger over the screen as long as you want and that would never trigger. At least not till phones advance enough to watch our hands when not touching the screen, but that just gets creepy 😨. |
Galaxy S5 actually had it (got taken out for S6). I think BlackBerry Storm might have had something analogous as well. I think hover is of very limited use for Popovers, but thought it would be appropriate to demonstrate all the options for |
BTW, this is really annoying: react-bootstrap/docs/examples/ModalStatic.js Lines 1 to 3 in 480944b
The static modal isn't actually hideable, so you just get that alert every time you hit escape on the components page. IMO we should get rid of it entirely. The root close logic should be merged across this, modals, and dropdowns as much as possible, but not until after your dropdown changes land, I think. |
You last comment I assume is what triggered #701 😉 I agree about that close logic, though I don't know who well a wrapper component will work. With the DropdownButton we don't remove the DropdownMenu from the DOM when it's collapsed, it's hidden with CSS. |
And the "background click" logic for modals isn't quite the same either. I'd just like to avoid duplicating the logic between this and dropdowns, as much as possible. |
Understandable, I'm just thinking it could be more of a utility function to call as opposed to a component wrapper. The main issue is adding that event listener and removing it accordingly. The dropdown changes don't need the key event listener though since focus will be on the |
iPad:
BTW: |
Does the same problem apply to dropdowns as well on iOS? |
I havn't checked. |
The dropdowns don't have a hover or on focus trigger though so I wouldn't image this being a problem. Although there is a request to support it. I'm fine with having them, but we should at least warn people of the ramifications. |
Dropdown buttons are OK. |
Which fixes do we need before merging this? |
I'd like some added documentation warning about the two usages described above for Mobile and Accessibility considerations. |
I'd prefer to sort out issues with iOS click hack for |
|
[added] Enable rootClose for OverlayTrigger
@mtscout6 - A minor suggestion: close the overlay on mousedown instead of (or in addition to) on click. This doesn't match Bootstrap's built-in functionality, but it does match the browser's native context menu functionality and feels more responsive. |
@aldendaniels I agree. I think the new dropdown menu code does what you say. Once we merge that, we can be consistent about closing the overlay on mousedown. |
@taion Thanks for adding the functionality to address Popover dismissal. Do you have an example or demo we can look at to get this working? I'm not sure how to use the rootClose property. |
@eventhough See the 3rd example here: http://react-bootstrap.github.io/components.html#popovers |
I would like to be able to provide a callback to be executed on closing the popover. How can I achieve this? |
@hugoduraes I don't believe we currently do not have a mechanism in place for invoking a callback on popover close. Feel free to submit a pull request if you'd like one in there, sounds reasonable enough to me to have. |
…strap#698) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.0 to 6.5.4. **This update includes a security fix.** - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.4.0...v6.5.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Fixes #233