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
cannot set modal backdrop root element #34309
Comments
Hello @eladmarg Please if you want an answer, try to be more specific , and add some code snippet and examples. What was the behavior before and after the change, what are the expectations and for what reason |
Hi @GeoSot , if I would like to create the modal-backdrop div, not inside the body, I have no way to do it in the current version. in the _initializeBackDrop() function return new Backdrop({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated(), }); so there is no option to override the rootElement _initializeBackDrop() { return new Backdrop({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated(), rootElement: this._config.rootElement }); } |
So my real question is: "Does the modal had a different attitude before backdrop change, that got ruined or you would to have this option as feature?" The initial message indicates that we broke this functionality, but my searches on the previous changes doesn't seem to agree In case of miswrote , please help us by fixing your initial message . There are some MRs and Feature Requests open but stale about this feature, that's why I left an entry point (the option), during the implementation. |
yes, i managed to solve this by modifying the dist version, but I think it's better to have the ability to set the backdrop container on data-bs-root-element="#backdrop" for instance yes, #33018 might solve this but it's not ready for pr. |
So you are really welcome to create a new one :D |
after modal backdrop change, it's always appended to the body.
there is a constructor to change the default, but it always taking default values for visible and animated properties.
return new Backdrop({
isVisible: Boolean(this._config.backdrop),
isAnimated: this._isAnimated(),
});
so even if this._config contains other parameters, they're not passed to the ctor.
this can be extended with ... or get other properties as well.
The text was updated successfully, but these errors were encountered: