From 645c33378769969c525a1552c65f8d0005e25fcf Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Tue, 19 Dec 2023 10:44:54 +0100 Subject: [PATCH] Fix unresponsive circle icon in revert button This commit fixes a UI bug where the circle icon of the revertbutton was unresponsive to clicks. The solution involves replacing the pseudo-element (`:before`) with an actual HTML element, enabling direct event binding. Additional improvements include: - Removal of redundant `z-index` properties to simplify click event handling and reduce complexity. - Programmatic toggle of `isChecked` on click, providing more controlled and explicit behavior and avoiding issues with native checkbox behavior, especially when overlaid on a pseudo-element. --- .../View/Tree/NodeContent/ToggleSwitch.vue | 15 +++++++------- tests/e2e/revert-toggle.cy.ts | 18 ++++++++++++++++- .../Tree/NodeContent/ToggleSwitch.spec.ts | 20 +++++++++++++++++-- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/src/presentation/components/Scripts/View/Tree/NodeContent/ToggleSwitch.vue b/src/presentation/components/Scripts/View/Tree/NodeContent/ToggleSwitch.vue index d0ba1b41..65f5df1f 100644 --- a/src/presentation/components/Scripts/View/Tree/NodeContent/ToggleSwitch.vue +++ b/src/presentation/components/Scripts/View/Tree/NodeContent/ToggleSwitch.vue @@ -1,7 +1,7 @@