[ http://issues.apache.org/jira/browse/WICKET-159?page=all ]

Eelco Hillenius resolved WICKET-159.
------------------------------------

    Resolution: Fixed

Index: 
/Users/eelcohillenius/Documents/workspace/wicket/src/main/java/wicket/markup/html/link/PopupSettings.java
===================================================================
--- 
/Users/eelcohillenius/Documents/workspace/wicket/src/main/java/wicket/markup/html/link/PopupSettings.java
   (revision 485070)
+++ 
/Users/eelcohillenius/Documents/workspace/wicket/src/main/java/wicket/markup/html/link/PopupSettings.java
   (working copy)
@@ -184,8 +184,8 @@
                        windowTitle = windowTitle.replace(':', '_');
                }
 
-               StringBuffer script = new StringBuffer("window.open(" + target 
+ ", '").append(windowTitle)
-                               .append("', '");
+               StringBuffer script = new StringBuffer("var w = window.open(" + 
target + ", '").append(
+                               windowTitle).append("', '");
 
                script.append("scrollbars=").append(flagToString(SCROLLBARS));
                script.append(",location=").append(flagToString(LOCATION_BAR));
@@ -214,7 +214,7 @@
                        script.append(",top=").append(top);
                }
 
-               script.append("'); ").append(" return false;");
+               script.append("'); if(w.blur) w.focus();").append(" return 
false;");
 
                return script.toString();
        }


> Default code for popups should always try to bring the popped up window to 
> the top (focus)
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-159
>                 URL: http://issues.apache.org/jira/browse/WICKET-159
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.2.3
>            Reporter: Eelco Hillenius
>         Assigned To: Eelco Hillenius
>
> The default implementation of popups (the script generated by PopupSettings) 
> should always try to focus on the popped up window.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to