Skip to content

Commit

Permalink
1255 share dialog should be quittable with esc (#1270)
Browse files Browse the repository at this point in the history
* popup chat close when esc pressed func. is added

* redundant line deleted.

* eslint fix

* eslint-fix 2

* reversed the pop-up chat by deleting function close on esc and added x-init close on esc on watch.gohtml
  • Loading branch information
barisgul15 authored and SebiWrn committed May 7, 2024
1 parent 07a0c38 commit d226ff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/template/watch.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>
<div x-cloak x-show="showShare"
id="share-modal" class="flex fixed top-0 h-screen w-screen z-50 backdrop-brightness-50">
<div class="m-auto lg:w-1/2 w-3/4" @click.outside="showShare=false">
<div class="m-auto lg:w-1/2 w-3/4" @click.outside="showShare=false" x-init="() => { window.addEventListener('keydown', (e) => { if (e.key === 'Escape') showShare = false; }); }">
<div class="bg-white dark:bg-secondary-light border dark:border-gray-800 rounded-lg">
<div class="flex justify-between items-center px-3 pt-3 pb-1">
<h3 class="text-3 text-sm font-semibold">Share</h3>
Expand Down

0 comments on commit d226ff2

Please sign in to comment.