mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
ensure table works on mobile (#1277)
* ensure tables works on mobile * remove logs * formatting
This commit is contained in:
parent
2a93225952
commit
79895e0e9d
@ -14,7 +14,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1"
|
||||
/>
|
||||
|
||||
<script type="module" src="./src/main.ts"></script>
|
||||
|
@ -376,7 +376,7 @@
|
||||
els[editing].cell !== event.target &&
|
||||
!els[editing].cell?.contains(event?.target as Node | null)
|
||||
) {
|
||||
header_edit = false;
|
||||
editing = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +451,10 @@
|
||||
let dragging = false;
|
||||
</script>
|
||||
|
||||
<svelte:window on:click={handle_click_outside} />
|
||||
<svelte:window
|
||||
on:click={handle_click_outside}
|
||||
on:touchstart={handle_click_outside}
|
||||
/>
|
||||
|
||||
<div
|
||||
class="scroll-hide whitespace-nowrap overflow-hidden rounded-lg relative border transition-colors overflow-x-scroll"
|
||||
@ -530,6 +533,7 @@
|
||||
<td
|
||||
tabindex="0"
|
||||
bind:this={els[id].cell}
|
||||
on:touchstart={() => start_edit(id)}
|
||||
on:click={() => handle_cell_click(id)}
|
||||
on:dblclick={() => start_edit(id)}
|
||||
on:keydown={(e) => handle_keydown(e, i, j, id)}
|
||||
|
Loading…
Reference in New Issue
Block a user