You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/08/11 22:53:17 UTC

svn commit: r1156825 - /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Author: hlship
Date: Thu Aug 11 20:53:16 2011
New Revision: 1156825

URL: http://svn.apache.org/viewvc?rev=1156825&view=rev
Log:
TAP5-877: Fade effect for error popups should be disabled in IE since it can't properly fade the images

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1156825&r1=1156824&r2=1156825&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Thu Aug 11 20:53:16 2011
@@ -1382,6 +1382,16 @@ Tapestry.ErrorPopup = Class.create({
         if (this.animation)
             return;
 
+        if (Prototype.Browser.IE) {
+            this.outerDiv.show();
+
+            var bound = _.bind(this.hideIfNotFocused, this);
+
+            _.delay(bound, 100);
+
+            return;
+        }
+
         this.animation = new Effect.Appear(this.outerDiv, {
             queue : this.queue,
             afterFinish : function() {
@@ -1393,6 +1403,15 @@ Tapestry.ErrorPopup = Class.create({
         });
     },
 
+    /** Used in IE to hide the field if not the focus field. */
+    hideIfNotFocused : function() {
+
+        if (this.field != Tapestry.currentFocusField) {
+            this.outerDiv.hide();
+        }
+    },
+
+
     stopAnimation : function() {
         if (this.animation)
             this.animation.cancel();
@@ -1404,6 +1423,11 @@ Tapestry.ErrorPopup = Class.create({
         if (this.animation)
             return;
 
+        if (Prototype.IE) {
+            this.outerDiv.hide();
+            return;
+        }
+
         this.animation = new Effect.Fade(this.outerDiv, {
             queue : this.queue,
             afterFinish : function() {