-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Issues with popover inside modal #20093
Comments
Hi @praveenpuglia,
This issue seems to be standard HTML behavior. When an anchor tag's href is set to "#", clicking the anchor will bring you back to the top of the page. To avoid scrolling, the markup should set the anchor's href as "javascript:void(0)" instead.
The issue with the lingering popover problem is caused by the popover not being hidden in the same way as the modal. When a modal gets dismissed, the CSS will hide the modal div and all of its children elements. The problem here has to do with the popover not being a child element of the modal, thus it doesn't get hidden along with the modal. When a popover is shown, it gets dropped onto the DOM at the end of the body. A solution to this problem could be to append the popover to the modal container instead. Another solution could be, when dismissing a modal, to look for children elements that popovers are tethered to. jQuery could then be used to select those popovers and dismiss them. Let me take a crack at this and get back to this issue. |
Closing out per previous comment since this will all be tackled. |
On the docs page for modals, there are some weird issues with the modal.
To reproduce the issues, go to that docs page and scroll to Live Demo section. Click on Launch demo modal.
This modal has a popover inside it which triggers upon clicking. Now.
The text was updated successfully, but these errors were encountered: