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

Target for .modal-open #31509

Open
bkbillma opened this issue Aug 19, 2020 · 3 comments
Open

Target for .modal-open #31509

bkbillma opened this issue Aug 19, 2020 · 3 comments

Comments

@bkbillma
Copy link

I am building a vue web component that uses bootstrap. All of my css/js is contained inside the web component. When i use the component and open a modal, the .modal-open is added to the body and because my css/js is contained to the web component some css doesn't work and the closing of the modal by clicking on modal background doesn't work.

If i could tell my modals to open with a target of the root of my web component (or if it could somehow detect it is inside of a web component) that should fix the issues.

The same functionality is needed for toasts.

@bkbillma
Copy link
Author

Perhaps it could check for a shadowRoot and if there is one attach to first block element or even require us to add a property to the element we want to attach to.

@XhmikosR XhmikosR added the js label Nov 18, 2020
@rohit2sharma95
Copy link
Collaborator

rohit2sharma95 commented Nov 23, 2020

@bkbillma As per my understanding, you want to open a modal within a container 🤔
But the modal plugin actually works globally in DOM, so where is the markup placed for modal, does not matter too much
It would be good if you could create a demo on stackblitz with the issue (Or if you could provide a sample code) 😄

I am not much familiar with web components

@spicalous
Copy link
Contributor

This would also be awesome for Ember developers as tests run the app in a container. It would also be awesome if we are able to also specify animation duration.

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

Successfully merging a pull request may close this issue.

5 participants