Skip to content

Commit

Permalink
Web interface: add keypress to non-interactive elements with on:click
Browse files Browse the repository at this point in the history
  • Loading branch information
DrZlo13 committed Sep 22, 2023
1 parent d0b0031 commit ab94351
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion components/svelte-portal/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
on:click={() => {
change_tab(tab);
}}
on:keypress={() => {
change_tab(tab);
}}
>
{tab}
</tab>
Expand All @@ -81,7 +84,11 @@
</tab-content>
{:else if current_tab == tabs[3]}
<tab-content>
<UartTerminal bind:this={uart_terminal} on_mount={uart_on_mount} send={uart_send}/>
<UartTerminal
bind:this={uart_terminal}
on_mount={uart_on_mount}
send={uart_send}
/>
</tab-content>
{/if}
</tabs-content>
Expand Down
2 changes: 1 addition & 1 deletion components/svelte-portal/src/lib/Api.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
let server = "";
if (development_mode) {
server = "http://172.30.1.83";
server = "http://192.168.0.18";
}
export const api = {
Expand Down
2 changes: 1 addition & 1 deletion components/svelte-portal/src/lib/Popup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<popup-wrapper>
<popup-body>
<popup-content>
<popup-close on:click={close}>X</popup-close>
<popup-close on:click={close} on:keypress={close}>X</popup-close>
<popup-border>
<slot />
</popup-border>
Expand Down

0 comments on commit ab94351

Please sign in to comment.