-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(modal): backdrops for appendTo (modal in modal) #6303
base: master
Are you sure you want to change the base?
Conversation
This needs to be configurable, as this would otherwise be a significant breaking change. |
This also needs unit tests |
Could we use I will create unit tests and commit them in combination with the changes related to the configuration param after your response. |
We could, but that should perhaps be a separate PR - multiple backdrops as siblings should be ok, as long as they are created in order. Appending the backdrop to the appropriate location then can follow as separate work. |
Could you please tell me in detail, which work should be separated in different PRs? At the moment it is only the following behaviour, which will be changed:
And this is the idea of this PR. If you agree with me, could this PR be merged, if I add tests and the configuration option? |
That would be sufficient if those changes are made plus documentation. |
@malaupa, what's the status of this? I got to this answer while looking for a way to keep multiple modals opened on different "tabs" (achieved using ui-router-sticky-states and ui-router-future-states), each one with its own backdrop. |
@paneyi, currently I have no time to add tests and the configuration option, but this PR is still on my todo list and will be fixed. For clarification: the idea of this PR is to create a modal inside a already opened modal with suitable backdrop limited to outer modal. |
Modals couldn't be used in modals (open a modal in a modal) and other containers. A new backdrop is now created on each appendTo element which is used in the app. If a backdrop exist on a element it is reused and the backdrop index is increase (old behavoir). To recognize which element has already a backdrop appended, a data-backtrop attribute is written on the related element.
Closes #6219 and #2678 is also related