Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10662 closed bug (cantfix)

Slide jumps when first child element has a top margin

Reported by: stijn.herreman@… Owned by:
Priority: low Milestone: None
Component: effects Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

When the first child element of the element being slided, has a top margin, a jump occurs.

Affected browsers:

  • IE 9
  • FF 7
  • Chrome 15

Test case at http://jsbin.com/onuyij

Change History (5)

comment:1 Changed 12 years ago by Timmy Willison

Component: unfiledeffects
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

This does not seem to be an issue in the latest version of jQuery. http://jsfiddle.net/timmywil/Ph7pG/

comment:2 Changed 12 years ago by stijn.herreman@…

It is not reproducible on jsfiddle. See http://jsbin.com/ajuwap/edit#source for a test case with the latest version of jQuery, so please reopen.

comment:3 Changed 12 years ago by ryanneufeld

By disabling the normalize css on jsifddle you can reproduce the bug.

see here: http://jsfiddle.net/ryanneufeld/Ph7pG/4/

What appears to be happening is that the children of the section being animated are losing the margin top, and once it's finished the style is being removed.

comment:4 Changed 12 years ago by Timmy Willison

Resolution: worksforme
Status: closedreopened

That makes sense. When animating width and height, there really is no way around setting overflow to hidden. When css is not normalized, this means that the elements may appear to have jumps in margin. This is due to the fact that setting overflow to hidden will remove margin collapsing. There are many ways to fix the issue and remove the jumps. One is to use normalized css, which removes all unnecessary margins as well as any margin collapsing. Or, the elements can be floated: http://jsfiddle.net/timmywil/Ph7pG/7/

comment:5 Changed 12 years ago by Timmy Willison

Resolution: cantfix
Status: reopenedclosed
Note: See TracTickets for help on using tickets.