Ticket #6245 (closed bug: fixed)
position: absolute is lost when .stop() is used with .show('blind')
| Reported by: | cosmicnet | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.9.0 |
| Component: | ui.effects.core | Version: | 1.8.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello,
$('#hoverme-stop').hover(function() {
$(this).find('.help').stop(true, true).show('blind');
}, function() {
$(this).find('.help').stop(true, true).hide('blind');
});
Which works great unless your element is position: absolute. In which case it switches it to position: relative which starts pushing around any succeeding elements. Only happens when stop has an actual animation to stop. If you mouse in an out slowly it works fine. I tried re-adding the position: absolute with the hack:- $(this).stop(true, true).css({position: absolute}).fadeIn(); But this loses the position within the document flow, making it appear at the top of the page. Tested with normal .show() and .fadeIn() and could not replicate, so appears to be specific to using .stop with .show('blind') and .hide('blind').
Lyle
P.S. I already submitted this bug to JQuery, they said it's for you guys instead:- http://bugs.jquery.com/ticket/7362
Change History
comment:2 Changed 2 years ago by tomykaira
https://github.com/jquery/jquery-ui/pull/320
Here is a patch. Maybe this occurs only with "blind".
comment:3 Changed 2 years ago by tomykaira
- Status changed from open to closed
- Resolution set to fixed
effects.blind: Save the wrapper status if already wrapped. Fixes #6245 - position: absolute is lost when .stop() is used with .show('blind').
Changeset: 129d5c75aca94ae636ba6396124c4938e43a50f3


http://jsfiddle.net/gnarf/6RD5a/