You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/01/15 15:49:00 UTC

[royale-asjs] branch develop updated: Partially fixed popup

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new f9b48b5  Partially fixed popup
f9b48b5 is described below

commit f9b48b50ae3fdac7d1e8b8f7593401f35b7b318a
Author: Harbs <ha...@in-tools.com>
AuthorDate: Tue Jan 15 17:48:50 2019 +0200

    Partially fixed popup
---
 .../main/royale/org/apache/royale/jewel/PopUp.as   | 22 +---------------------
 .../royale/jewel/beads/validators/Validator.as     | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/PopUp.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/PopUp.as
index d8e4e77..c95742b 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/PopUp.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/PopUp.as
@@ -55,7 +55,7 @@ package org.apache.royale.jewel
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.9.6
 	 */
-	public class PopUp extends StyledUIBase implements IPopUpHost, IPopUpHostParent
+	public class PopUp extends StyledUIBase
 	{
 		/**
 		 *  constructor.
@@ -72,26 +72,6 @@ package org.apache.royale.jewel
 			typeNames = "jewel popup";
 		}
 
-		/**
-         *  Form can host error tips but they will be in the layout, if any
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.4
-         */
-        public function get popUpParent():IPopUpHostParent
-        {
-            return this;
-        }
-
-        /**
-         */
-        public function get popUpHost():IPopUpHost
-        {
-            return this;
-        }
-
 		private var _modal:Boolean;
 
 		public function get modal():Boolean
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
index ee93f35..072b53c 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
@@ -292,6 +292,10 @@ package org.apache.royale.jewel.beads.validators
 				_host = UIUtils.findPopUpHost(hostComponent);
 				_host.popUpParent.addElement(_errorTip, false);
 			}
+			COMPILE::JS
+			{
+				hostComponent.element.addEventListener("blur",removeTip);
+			}
 
             _errorTip.text = errorText;
 
@@ -305,7 +309,17 @@ package org.apache.royale.jewel.beads.validators
 					hostClassList.add("errorBorder");
 			}
 		}
-		
+		private function removeTip(ev:Event):void
+		{
+			if(_errorTip){
+				_errorTip.parent.removeElement(_errorTip);
+				_errorTip = null;
+			}
+			COMPILE::JS
+			{
+				hostComponent.element.removeEventListener("blur",removeTip);
+			}
+		}
 
 		/**
 		 *  Determines the position of the errorTip.