Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311986

Change subject: Window#withoutSizeTransitions: Build transition property using 
sub-properties
......................................................................

Window#withoutSizeTransitions: Build transition property using sub-properties

FF doesn't return anything useful when just asking for the 'transition' CSS
property and thus we need to build it using transition-property, -delay etc.

Bug: T137130
Change-Id: Ida1567537c500acb57f3b0af2f8d09e79a6ce770
---
M src/Window.js
1 file changed, 12 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/86/311986/1

diff --git a/src/Window.js b/src/Window.js
index a8cd9d0..19c09fe 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -222,17 +222,20 @@
 OO.ui.Window.prototype.withoutSizeTransitions = function ( callback ) {
        // Temporarily resize the frame so getBodyHeight() can use scrollHeight 
measurements.
        // Disable transitions first, otherwise we'll get values from when the 
window was animating.
-       var oldTransition,
-               styleObj = this.$frame[ 0 ].style;
-       oldTransition = styleObj.transition || styleObj.OTransition || 
styleObj.MsTransition ||
-               styleObj.MozTransition || styleObj.WebkitTransition;
-       styleObj.transition = styleObj.OTransition = styleObj.MsTransition =
-               styleObj.MozTransition = styleObj.WebkitTransition = 'none';
+       // We need to build the transition CSS properties using these specific 
properties since
+       // Firefox doesn't return anything useful when asked just for 
'transition'.
+       var oldTransition = this.$frame.css( 'transition-property' ) + ' ' +
+               this.$frame.css( 'transition-duration' ) + ' ' +
+               this.$frame.css( 'transition-timing-function' ) + ' ' +
+               this.$frame.css( 'transition-delay' );
+
+       this.$frame.css( 'transition', 'none' );
        callback();
-       // Force reflow to make sure the style changes done inside callback 
really are not transitioned
+
+       // Force reflow to make sure the style changes done inside callback
+       // really are not transitioned
        this.$frame.height();
-       styleObj.transition = styleObj.OTransition = styleObj.MsTransition =
-               styleObj.MozTransition = styleObj.WebkitTransition = 
oldTransition;
+       this.$frame.css( 'transition', oldTransition );
 };
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/311986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida1567537c500acb57f3b0af2f8d09e79a6ce770
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <psax...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to