You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/07/14 15:25:38 UTC

[royale-asjs] branch develop updated: filebrowser: solve always dispatching cancel event (fix #886)

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

carlosrovira 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 88466ae  filebrowser: solve always dispatching cancel event (fix #886)
88466ae is described below

commit 88466ae3138c2b54ecb35c3bef5af44b75fa82d2
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Jul 14 17:25:25 2020 +0200

    filebrowser: solve always dispatching cancel event (fix #886)
---
 .../src/main/royale/org/apache/royale/file/beads/FileBrowser.as   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads/FileBrowser.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads/FileBrowser.as
index 10d6221..01347aa 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads/FileBrowser.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads/FileBrowser.as
@@ -146,6 +146,8 @@ package org.apache.royale.file.beads
 			//trace("files: " + (delegate as HTMLInputElement).files.length);
 			cleanupWindow();
 		}
+
+		public static const CANCEL_TIMEOUT:Number = 150;
 		
 		COMPILE::JS
 		private function focusHandler(e:Object):void
@@ -153,7 +155,7 @@ package org.apache.royale.file.beads
 			//trace("focus: " + e);
 			//trace("files: " + (delegate as HTMLInputElement).files.length);
 			cleanup();
-			setTimeout(maybeCancel, 100);
+			setTimeout(maybeCancel, CANCEL_TIMEOUT);
 		}
 		
 		COMPILE::JS
@@ -162,7 +164,7 @@ package org.apache.royale.file.beads
 			//trace("key: " + e);
 			//trace("files: " + (delegate as HTMLInputElement).files.length);
 			cleanup();
-			setTimeout(maybeCancel, 100);
+			setTimeout(maybeCancel, CANCEL_TIMEOUT);
 		}
 		
 		COMPILE::JS
@@ -171,7 +173,7 @@ package org.apache.royale.file.beads
 			//trace("mouse: " + e);
 			//trace("files: " + (delegate as HTMLInputElement).files.length);
 			cleanup();
-			setTimeout(maybeCancel, 100);
+			setTimeout(maybeCancel, CANCEL_TIMEOUT);
 		}
 				
 		COMPILE::JS