Opened 14 years ago
Last modified 10 years ago
#4228 open bug
margin: #px auto; not respected with effects
Reported by: | ChronoworX | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | none |
Component: | ui.effects.core | Version: | 1.6rc6 |
Keywords: | margin, auto, effect | Cc: | |
Blocked by: | Blocking: |
Description
== Description ==
If an object has a margin: #px auto; CSS decleration used for centering, adding an effect like 'shake' or 'bounce' causes the object to be aligned to the left (disrespecting the 'auto' part in the margin decleration) in the following browers:
Opera 9(.63), FF 2(.0.0.20), FF 3(.0.6) and IE 6
Also, the content below this object snaps to a lower position during the animation in the browsers mentioned above AND:
Safari 4(public beta 5528.16), WebKit (nightly build), Chrome (1.0.154.48)
== Expected behaviour ==
The object should stay centered during the animation (of course, taking the offsets of the animation into account).
Attachments (1)
Change History (12)
Changed 14 years ago by
Attachment: | jquery_margin_auto_effect.html added |
---|
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.next |
---|
comment:2 Changed 14 years ago by
Milestone: | 1.next → 1.7 |
---|
comment:3 Changed 14 years ago by
Milestone: | 1.7 → 1.8 |
---|
comment:4 Changed 12 years ago by
I am encountering this issue. I would just like to add that it also left aligns in IE 7 and IE 8. It works properly in Chrome and IE9. I know this issue is present in JQuery UI 1.8.9.
comment:6 Changed 12 years ago by
http://bugs.jqueryui.com/ticket/6120 has some code that may help find the solution...
comment:7 Changed 12 years ago by
Status: | new → open |
---|
http://jsfiddle.net/gnarf/vmL38/ for a jsfiddle test case - note this seems to happen with almost every effect...
comment:8 Changed 12 years ago by
https://github.com/tomykaira/jquery-ui/tree/bug_4228 Here is a patch. The width of wrapper is 100%, when the block is not floating. This makes the original margin setting work correctly.
comment:9 Changed 12 years ago by
not landed, but useful for reference: https://github.com/jquery/jquery-ui/pull/285
comment:10 Changed 11 years ago by
Milestone: | 1.9.0 → 1.10.0 |
---|
comment:11 Changed 10 years ago by
Milestone: | 1.10.0 → none |
---|
Test case