You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/04/26 16:45:40 UTC

git commit: WICKET-5119 PopupSettings IE8 - dosen't work secound time a link is clicked.

Updated Branches:
  refs/heads/master 5a4f1a4d8 -> 43c7b2f16


WICKET-5119 PopupSettings IE8 - dosen't work secound time a link is clicked.

Try/catch the focusing of the popup window because it throws exceptions in IE8+


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/43c7b2f1
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/43c7b2f1
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/43c7b2f1

Branch: refs/heads/master
Commit: 43c7b2f1601c3ae0ace04dea8f2a9bd5088e8de2
Parents: 5a4f1a4
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Apr 26 16:44:51 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Apr 26 16:44:51 2013 +0200

----------------------------------------------------------------------
 .../wicket/markup/html/link/PopupSettings.java     |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/43c7b2f1/wicket-core/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
index b446034..82dc08f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
@@ -155,7 +155,7 @@ public class PopupSettings implements IClusterable
 			windowTitle = windowTitle.replaceAll("\\W", "_");
 		}
 
-	 StringBuilder script = new StringBuilder("var w = window.open(" + target + ", '").append(
+	    StringBuilder script = new StringBuilder("var w = window.open(" + target + ", '").append(
 			windowTitle).append("', '");
 
 		script.append("scrollbars=").append(flagToString(SCROLLBARS));
@@ -185,7 +185,7 @@ public class PopupSettings implements IClusterable
 			script.append(",top=").append(top);
 		}
 
-		script.append("'); if(w.blur) w.focus();").append(" return false;");
+		script.append("'); try {if (w.blur) w.focus();}catch(ignore){}; return false;");
 
 		return script.toString();
 	}