From: jprocter Date: Wed, 21 Jul 2010 15:06:07 +0000 (+0000) Subject: URLs that begin with javascript: are opened in the same window. See X-Git-Tag: Release_2_6~142 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b77e5440f9a866b464b0077478b604df513cf3fc;p=jalview.git URLs that begin with javascript: are opened in the same window. See http://issues.jalview.org/browse/JAL-604 --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index ccf7c06..14606b7 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -2580,8 +2580,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { System.out.println("Show url: " + url); } - viewport.applet.getAppletContext().showDocument( + if (url.indexOf("javascript:")==0) + { + // no target for the javascript context + viewport.applet.getAppletContext().showDocument(new java.net.URL(url)); + } else{ + viewport.applet.getAppletContext().showDocument( new java.net.URL(url), target); + } } catch (Exception ex) { ex.printStackTrace();