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

effects.blind: fix: save the wrapper status if already wrapped. #6245 #320

Closed
wants to merge 2 commits into from

Conversation

tomykaira
Copy link
Contributor

effects.blind: fix: save the wrapper status if already wrapped. #6245 - position: absolute is lost when .stop() is used with .show('blind').

Overriding the stack with position:absolute, top/left: 0 made the problem.
This new function saves its owner position info instead of the parameters of itself.
This problem is maybe unique to blind, because blind is the only effect which animates the wrapper.

The test file is here.
https://gist.github.com/982853

… - position: absolute is lost when .stop() is used with .show('blind').
@@ -31,7 +31,11 @@ $.effects.effect.blind = function( o ) {
animation = {},
wrapper, distance;

$.effects.save( el, props );
// if already wrapped, the wrapper's properties are my property. #6245
if ( el.parent().is( ".ui-effects-wrapper" ) )
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use brackets for an if statement.

…x: #6245 - position: absolute is lost when .stop() is used with .show('blind').
@tomykaira
Copy link
Contributor Author

Sorry.

I added {}, and rewrite the commit comment.

@gnarf
Copy link
Member

gnarf commented May 22, 2011

Once again I ask - does this problem also affect other effects? If so, maybe there is a better solution inside $.effects.save -- Like checking to see if we have already saved state data or something...

@tomykaira
Copy link
Contributor Author

As I wrote in the pull request message, this problem is because blind is the only effect which animates the wrapper.

Now, there is no effect which uses the wrapper. But there could be in the future.

In such case, which is better, modify the core or just fix blind effect?

@gnarf
Copy link
Member

gnarf commented May 22, 2011

Hrm... Alright, if this is the only one for now, lets leave the solution to the problem here...

I think this one ready to pull with a squash @scottgonzalez

@scottgonzalez
Copy link
Member

Thanks, landed in 129d5c7.

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