Skip to main content

Bug Tracker

Side navigation

#11635 closed bug (fixed)

Opened April 24, 2012 02:53PM UTC

Closed October 16, 2012 04:31PM UTC

Last modified December 29, 2012 04:25AM UTC

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

Reported by: yonjah@gmail.com 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.

Attachments (0)
Change History (19)

Changed April 24, 2012 03:17PM UTC by rwaldron comment:1

component: unfiledeffects
owner: → yonjah@gmail.com
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.

Changed April 24, 2012 03:31PM UTC by mikesherov comment:2

this is resolved in jQuery 1.8

Changed April 24, 2012 03:46PM UTC by rwaldron comment:3

resolution: → fixed
status: pendingclosed

Changed April 24, 2012 03:49PM UTC by yonjah@gmail.com comment:4

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)

Changed April 24, 2012 04:41PM UTC by rwaldron comment:5

milestone: None1.8
priority: lowhigh
resolution: fixed
status: closedreopened

Confirmed. Further reduced:

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

Changed April 24, 2012 04:44PM UTC by rwaldron comment:6

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

Changed April 24, 2012 05:20PM UTC by scottgonzalez comment:7

rwaldron: jQuery edge is master, not 1.8pre.

Changed April 24, 2012 05:28PM UTC by rwaldron comment:8

resolution: → fixed
status: reopenedclosed

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

Changed April 24, 2012 06:09PM UTC by mikesherov comment:9

_comment0: YOUR WELCOME1335291320346477

YOU'RE WELCOME

Changed April 24, 2012 07:27PM UTC by rwaldron comment:10

you're* :P

Changed September 02, 2012 03:40PM UTC by yonjah@gmail.com comment:11

just updated jQuery to v1.8.1

and this issue is still happening

Changed October 15, 2012 05:24PM UTC by timmywil comment:12

milestone: 1.8
resolution: fixed
status: closedreopened

Changed October 15, 2012 05:25PM UTC by timmywil comment:13

milestone: → 1.next
status: reopenedopen
version: 1.7.21.8.2

Changed October 15, 2012 05:25PM UTC by timmywil comment:14

overflow: hidden is left there.

Changed October 15, 2012 05:26PM UTC by elgreg comment:15

#12456 is a duplicate of this ticket.

Changed October 15, 2012 08:28PM UTC by elgreg comment:16

owner: yonjah@gmail.competro
status: openassigned

Changed October 15, 2012 08:50PM UTC by petro comment:17

Changed October 16, 2012 04:31PM UTC by Mike Petrovich comment:18

resolution: → fixed
status: assignedclosed

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

Changeset: 861476eb3fb5e378fdbb4e86e4737daf6de27f13

Changed December 29, 2012 04:25AM UTC by mikesherov comment:19

#12630 is a duplicate of this ticket.