Skip to content

Commit edb704a

Browse files
mustard-mhjeanp413
authored andcommitted
Fix a tag open tab twice for Firefox
1 parent dac32a4 commit edb704a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/gitpod-shared/portsview/src/porttable/PortLocalAddress.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
const dispatch = createEventDispatcher<{
1212
command: { command: PortCommand; port: GitpodPortObject };
1313
}>();
14-
function openAddr(e: Event) {
15-
e.preventDefault();
14+
function openAddr() {
1615
if (port.status.exposed.url) {
1716
dispatch("command", { command: "openBrowser" as PortCommand, port });
1817
}
@@ -24,7 +23,8 @@
2423
alwaysShow
2524
on:command={(e) => { console.log(e); dispatch("command", { command: e.detail, port}) }}
2625
>
27-
<a on:click={(e) => { openAddr(e) }} href={port.status.exposed.url}>{port.status.exposed.url}</a>
26+
<!-- svelte-ignore a11y-invalid-attribute -->
27+
<a on:click={() => { openAddr(); return false; }} href="javascript:void(0)">{port.status.exposed.url}</a>
2828
</PortHoverActions>
2929

3030
<style>

0 commit comments

Comments
 (0)