Commit e8673ae1 authored by timmywil's avatar timmywil

When stopping a show, save showing end state instead of start state to fix...

When stopping a show, save showing end state instead of start state to fix animation toggling issue. Fixes #10848.
parent 135bb4ff
...@@ -462,8 +462,12 @@ jQuery.fx.prototype = { ...@@ -462,8 +462,12 @@ jQuery.fx.prototype = {
t.queue = this.options.queue; t.queue = this.options.queue;
t.elem = this.elem; t.elem = this.elem;
t.saveState = function() { t.saveState = function() {
if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
if ( self.options.hide ) {
jQuery._data( self.elem, "fxshow" + self.prop, self.start ); jQuery._data( self.elem, "fxshow" + self.prop, self.start );
} else if ( self.options.show ) {
jQuery._data( self.elem, "fxshow" + self.prop, self.end );
}
} }
}; };
......
...@@ -167,7 +167,7 @@ jQuery.support = (function() { ...@@ -167,7 +167,7 @@ jQuery.support = (function() {
// avoid an eval call (in setAttribute) which can cause CSP // avoid an eval call (in setAttribute) which can cause CSP
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
if ( div.attachEvent ) { if ( div.attachEvent ) {
for( i in { for ( i in {
submit: 1, submit: 1,
change: 1, change: 1,
focusin: 1 focusin: 1
...@@ -222,6 +222,7 @@ jQuery.support = (function() { ...@@ -222,6 +222,7 @@ jQuery.support = (function() {
// hidden; don safety goggles and see bug #4512 for more information). // hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test) // (only IE 8 fails this test)
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
tds = div.getElementsByTagName( "td" ); tds = div.getElementsByTagName( "td" );
isSupported = ( tds[ 0 ].offsetHeight === 0 ); isSupported = ( tds[ 0 ].offsetHeight === 0 );
...@@ -278,7 +279,7 @@ jQuery.support = (function() { ...@@ -278,7 +279,7 @@ jQuery.support = (function() {
offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
if( window.getComputedStyle ) { if ( window.getComputedStyle ) {
div.style.marginTop = "1%"; div.style.marginTop = "1%";
support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment