public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, yew-devel@lists.proxmox.com
Subject: applied: [PATCH yew-widget-toolkit v2] widget: dialog: prevent Escape from closing non-closable modals
Date: Wed, 15 Jul 2026 11:28:44 +0200	[thread overview]
Message-ID: <e587b3f8-f98a-4dc0-9c30-350fd3e9abc6@proxmox.com> (raw)
In-Reply-To: <20260709141455.623886-1-d.csapak@proxmox.com>

Am 09.07.26 um 16:14 schrieb Dominik Csapak:
> Pressing Escape on a <dialog> triggers the browser's native close
> handling regardless of whether our code considers the dialog closable.
> When the dialog has no 'on_close' callback (e.g. a Login Window), this
> leaves our component state and the native dialog state out of sync: the
> browser treats the dialog as closed, while our widget is still rendered
> but without the corresponding 'open' CSS class (which hides the
> backdrop).
> 
> Intercept the KeyDown event and call stop_propagation()/
> prevent_default() for Escape whenever the dialog isn't closable,
> so the browser never fires its native close in the first place.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> changes from v1:
> * drop the leftover debug log::info line
> 
>  src/widget/dialog.rs | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
>

for the record, this has been applied by Dietmar:
https://git.proxmox.com/?p=ui/proxmox-yew-widget-toolkit.git;a=commitdiff;h=862559c5fe4e8355d3eed76522e6ec7b27a35e79




      reply	other threads:[~2026-07-15  9:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 14:14 [PATCH yew-widget-toolkit v2] widget: dialog: prevent Escape from closing non-closable modals Dominik Csapak
2026-07-15  9:28 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e587b3f8-f98a-4dc0-9c30-350fd3e9abc6@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=yew-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal