From 339bf436d1c2e5f5ef14310f34f1d133007c4da6 Mon Sep 17 00:00:00 2001 From: Evgeny Kulikov Date: Fri, 14 Mar 2025 11:47:03 +0200 Subject: [PATCH] Prevent accidental dragging of audio playback buttons and hint links (#3844) * Add myself to CONTRIBUTORS * Set draggable="false" attribute on .replay-button Because currently if a user drags slightly (even unintentionally) upon clicking a play button, play does not happen * Prevent dragging hint links Because if a user moves cursor a little after `mousedown`, action (expanding the hint) does not occur. Which might cause issues from accessibility standpoint --- CONTRIBUTORS | 1 + qt/aqt/sound.py | 2 +- rslib/src/template_filters.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9524eb675..7dc2cf51e 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -207,6 +207,7 @@ Luca Auer Niclas Heinz Omar Kohl David Elizalde +beyondcompute Yuki wackbyte GithubAnon0000 diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index a7662f8bd..0b3673c10 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -845,7 +845,7 @@ def av_refs_to_play_icons(text: str) -> str: def repl(match: re.Match) -> str: return f""" - + diff --git a/rslib/src/template_filters.rs b/rslib/src/template_filters.rs index f1aac788c..cb3504fe3 100644 --- a/rslib/src/template_filters.rs +++ b/rslib/src/template_filters.rs @@ -192,7 +192,7 @@ fn hint_filter<'a>(text: &'a str, field_name: &str) -> Cow<'a, str> { +return false;" draggable=false> {} "##, @@ -232,7 +232,7 @@ mod test { +return false;" draggable=false> field "##