Skip to content

Commit

Permalink
Merge pull request #542 from sitaradev/gif-picker-fixes
Browse files Browse the repository at this point in the history
prevent enter
  • Loading branch information
gagansuie authored Jun 22, 2023
2 parents 599a87d + 1480887 commit 39cabc5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/lib/components/Channel/Chat/GifPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@
type="text"
placeholder="Search here"
class="input input-bordered input-sm w-full max-w-xs"
on:input={onSearch} />
on:input={onSearch}
on:keydown={(e) => {
if(e.key === 'Enter'){
e.preventDefault()
onSearch(e)
}
}}
/>
</div>

{#if loading}
Expand All @@ -56,12 +63,12 @@
{#each list as gif}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="border cursor-pointer"
class="cursor-pointer"
on:click={() => {
onSelect(gif.downsized_large)
forceClose()
}}>
<img src={gif.downsized_large} alt="gif" class="w-full" />
<img src={gif.downsized_large} alt="gif" class="w-full border p-1" />
</div>
{/each}
</div>
Expand Down

0 comments on commit 39cabc5

Please sign in to comment.