Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

fix(modal): backdrops for appendTo (modal in modal) #6303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

malaupa
Copy link

@malaupa malaupa commented Oct 27, 2016

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

@wesleycho
Copy link
Contributor

This needs to be configurable, as this would otherwise be a significant breaking change.

@wesleycho
Copy link
Contributor

This also needs unit tests

@malaupa
Copy link
Author

malaupa commented Oct 28, 2016

Could we use backdropAppend as the a new param for backdrop creation on each appendTo element? Do you prefer another parameter name? Values could be true or false?

I will create unit tests and commit them in combination with the changes related to the configuration param after your response.

@wesleycho
Copy link
Contributor

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.

@malaupa
Copy link
Author

malaupa commented Dec 19, 2016

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:

  1. configuration option to append backdrops to the appropriate location (the appendTo element), if appendTo is configured

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?

@wesleycho
Copy link
Contributor

That would be sufficient if those changes are made plus documentation.

@paneyi
Copy link

paneyi commented Jul 17, 2017

@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.
Right now, each modal is contained in the proper tab, but the backdrop remains below the first created modal, leaving the modals on the other tabs without a backdrop.

@malaupa
Copy link
Author

malaupa commented Aug 1, 2017

@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.

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

Successfully merging this pull request may close these issues.

3 participants