From 30e6cb3cc23c2b00334e9721fdf0dfab51adb957 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 1 Dec 2014 18:26:28 -0500 Subject: [PATCH] Fix transition sometimes keeping inline style unnecesarily --- src/definitions/modules/transition.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 723ff249e..023efd275 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -209,6 +209,12 @@ $.fn.transition = function() { return true; } return false; + }, + inlineDisplay: function() { + var + style = $module.attr('style') || '' + ; + return $.isArray(style.match(/display.*?;/, '')); } }, @@ -259,8 +265,10 @@ $.fn.transition = function() { var style = module.get.style(), displayType = module.get.displayType(), + hasInlineDisplay = module.has.inlineDisplay(), overrideStyle = style + 'display: ' + displayType + ' !important;' ; + $module.css('display', ''); module.refresh(); if( $module.css('display') !== displayType ) { module.verbose('Setting inline visibility to', displayType); @@ -484,7 +492,7 @@ $.fn.transition = function() { }, style: function() { var - style = $module.attr('style') || '' + style = $module.attr('style') || '' ; return style.replace(/display.*?;/, ''); },