Skip to content

Commit

Permalink
CSSTUDIO-2581 Always prevent default action in the event handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahamwolk committed Aug 26, 2024
1 parent cef9860 commit 2f42635
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public void changed(ObservableValue<? extends State> 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);
}
Expand Down

0 comments on commit 2f42635

Please sign in to comment.