public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-widget-toolkit-assets] disable pointer events for disabled inputs
Date: Thu, 22 May 2025 10:52:54 +0200	[thread overview]
Message-ID: <20250522085254.893284-1-d.csapak@proxmox.com> (raw)

when an input is disabled, we should prevent all pointer events,
otherwise it can happen that the browser decides an element has focus
and will show an outline, which is not desired for mouse input on
disabled fields (only for keyboard navigation, but this is unaffected
with this change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 scss/_input.scss | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scss/_input.scss b/scss/_input.scss
index 5113fdd..b8ad81a 100644
--- a/scss/_input.scss
+++ b/scss/_input.scss
@@ -86,6 +86,7 @@ input {
     &[aria-disabled=true]{
         cursor: auto;
         opacity: 0.5;
+        pointer-events: none;
     }
 }
 
@@ -177,6 +178,7 @@ input {
     &.disabled {
         cursor: auto;
         opacity: 0.5;
+        pointer-events: none;
     }
 }
 
@@ -230,6 +232,7 @@ input {
     &.disabled {
         cursor: auto;
         opacity: 0.5;
+        pointer-events: none;
     }
 
     &.disabled.checked {
@@ -311,6 +314,7 @@ input {
     &:disabled {
         cursor: auto;
         opacity: 0.5;
+        pointer-events: none;
     }
 }
 
-- 
2.39.5



_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


                 reply	other threads:[~2025-05-22  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250522085254.893284-1-d.csapak@proxmox.com \
    --to=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