Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#11635 closed bug (fixed)

Explicit overflow:auto is overridden by inline overflow:hidden during animation

Reported by: yonjah@… Owned by: petro
Priority: high Milestone: 1.next
Component: effects Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

This might be two bugs or one (I'm not really sure).

jQuery will use the following method (line 1612) ->

// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
div.style.display = "block";
div.style.overflow = "visible";
div.innerHTML = "<div style='width:5px;'></div>";
support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );

unfortunately this will fail on new browsers if document style settings will set all elements to use "box-sizing:border-box" ( I only tested it in chrome 18 but will probably repeat it self with any border-box supported browsers)

I wouldn't have noticed this issue if jQuery animation wouldn't set my animated elements overflow to hidden and but then fail to remove them when animation ends (line 8892) ->

if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {

	jQuery.each( [ "", "X", "Y" ], function( index, value ) {
		elem.style[ "overflow" + value ] = options.overflow[ index ];
	});
}

I don't know what the original IE6 bug was that this flag tried to solve, but this seems to be the only place that it's used. and it would seem wierd that this is a desired action even on IE6 (chnaging original overflow settings and not restoring them when animation ends).

Yoni.

Change History (19)

comment:1 Changed 11 years ago by Rick Waldron

Component: unfiledeffects
Owner: set to yonjah@…
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.

comment:2 Changed 11 years ago by mikesherov

this is resolved in jQuery 1.8

comment:3 Changed 11 years ago by Rick Waldron

Resolution: fixed
Status: pendingclosed

comment:4 Changed 11 years ago by yonjah@…

Fiddle test code -> http://jsfiddle.net/GEZ4B/

(this is using JQuery edge so I'm not sure if this is really resolved in 1.8)

comment:5 Changed 11 years ago by Rick Waldron

Milestone: None1.8
Priority: lowhigh
Resolution: fixed
Status: closedreopened

Confirmed. Further reduced:

http://jsfiddle.net/rwaldron/aXAE8/

comment:6 Changed 11 years ago by Rick Waldron

Summary: Bad layout shrink-wrap detection / JQuery will not remove overflow:hidden from animated elementsExplicit overflow:auto is overridden by inline overflow:hidden during animation

Updating title to make sense

comment:7 Changed 11 years ago by scottgonzalez

rwaldron: jQuery edge is master, not 1.8pre.

comment:8 Changed 11 years ago by Rick Waldron

Resolution: fixed
Status: reopenedclosed

Thanks scott. I tested this with 1.8pre http://jsfiddle.net/rwaldron/aXAE8/ and there is no longer an issue

comment:9 Changed 11 years ago by mikesherov

YOU'RE WELCOME

Last edited 11 years ago by mikesherov (previous) (diff)

comment:10 Changed 11 years ago by Rick Waldron

you're* :P

comment:11 Changed 11 years ago by yonjah@…

just updated jQuery to v1.8.1 and this issue is still happening

comment:12 Changed 11 years ago by Timmy Willison

Milestone: 1.8
Resolution: fixed
Status: closedreopened

comment:13 Changed 11 years ago by Timmy Willison

Milestone: 1.next
Status: reopenedopen
Version: 1.7.21.8.2

comment:14 Changed 11 years ago by Timmy Willison

overflow: hidden is left there.

comment:15 Changed 11 years ago by elgreg

#12456 is a duplicate of this ticket.

comment:16 Changed 11 years ago by elgreg

Owner: changed from yonjah@… to petro
Status: openassigned

comment:18 Changed 11 years ago by Mike Petrovich

Resolution: fixed
Status: assignedclosed

Fixes #11635, Explicit overflow:auto is overridden by inline overflow:hidden during animation, closes gh-981

Changeset: 861476eb3fb5e378fdbb4e86e4737daf6de27f13

comment:19 Changed 10 years ago by mikesherov

#12630 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.