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

fix(modal): restore broken stacked modals #6104

Closed
wants to merge 1 commit into from
Closed

fix(modal): restore broken stacked modals #6104

wants to merge 1 commit into from

Conversation

fpipita
Copy link
Contributor

@fpipita fpipita commented Jul 20, 2016

Hi,

with 2.0.0, stacked modals are not getting the zIndex property correctly set anymore because the index property needed by ngStyle to compute the zIndex property, is not available on the ngStyle scope (which is the modal scope).

This PR solves it by simply adding a new "private" property to the modal scope, $$topModalIndex which provides the actual modal index value.

Closes #6103

// This might need to be marked as a breaking change because
// "$$topModalIndex" could eventually shadow a property with the
// same name defined on the provided modal scope.
modal.scope.$$topModalIndex = topModalIndex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm ok w/ the name seeing as one is not supposed to be using $ as prefixes for their code. but this is good insight to be aware of.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think it needs a BC because of that reason.

@icfantv
Copy link
Contributor

icfantv commented Jul 20, 2016

@fpipita, i'm ok with this. thanks for putting this together.

@fpipita
Copy link
Contributor Author

fpipita commented Jul 21, 2016

@icfantv please, let me know whether I should remove the BC tag from the commit message.

@icfantv
Copy link
Contributor

icfantv commented Jul 21, 2016

That's fine, or I can remove it on commit.

@fpipita
Copy link
Contributor Author

fpipita commented Jul 21, 2016

Ok, done.

@icfantv
Copy link
Contributor

icfantv commented Jul 21, 2016

@fpipita did you forget to push your changes? i'm not seeing them.

@fpipita
Copy link
Contributor Author

fpipita commented Jul 21, 2016

@icfantv I've pushed them, the BC tag is not in the commit body anymore. Did I get anything wrong?

@icfantv
Copy link
Contributor

icfantv commented Jul 21, 2016

My bad, I was looking at the comment in the code. Do you mind fixing that please?

@fpipita
Copy link
Contributor Author

fpipita commented Jul 21, 2016

No problem, I've cleaned it up.

@alejandromagnorsky
Copy link

@icfantv , do you mind making a new release (2.0.1) with this fix please? I'm waiting for it to publish a website that uses version 2.0.0 and has the stack modals bug.
Thank you.

@wesleycho
Copy link
Contributor

Done.

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.

4 participants