diff --git a/core/ui/src/main/java/org/phoebus/ui/web/HyperLinkRedirectListener.java b/core/ui/src/main/java/org/phoebus/ui/web/HyperLinkRedirectListener.java index c58ffded03..4a35199555 100644 --- a/core/ui/src/main/java/org/phoebus/ui/web/HyperLinkRedirectListener.java +++ b/core/ui/src/main/java/org/phoebus/ui/web/HyperLinkRedirectListener.java @@ -81,11 +81,11 @@ public void changed(ObservableValue observable, State oldValue, private class HyperLinkRedirectEventListener implements EventListener { @Override public void handleEvent(Event event) { + event.preventDefault(); HTMLAnchorElement anchorElement = (HTMLAnchorElement) event.getCurrentTarget(); String href = anchorElement.getHref(); try { ApplicationService.createInstance("web", new URI(href)); - event.preventDefault(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to launch WebBrowserApplication", e); }