From 65655ba35fc87a2c680d5c15e9a84779fe513c03 Mon Sep 17 00:00:00 2001 From: Kelly Yang <124ykl@gmail.com> Date: Wed, 11 Mar 2026 23:34:40 -0700 Subject: [PATCH] fix: update WidgetLayoutField border styling (#9456) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This makes the focus ring only appear on keyboard navigation (Tab), not on mouse click for widgets like toggle switches, while text inputs still show the ring on click since browsers apply ` :focus-visible` to them. ## Mozilla Standard Legacy `focus-within` triggers a highlight ring on every mouse click, creating unnecessary visual noise during canvas navigation. Following [MDN standards](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible), `:focus-visible` only triggers the highlight when the browser determines a visual cue is needed (e.g., keyboard navigation). Using the `:has()` relational selector allows the container to react to the state of its children natively in CSS. Removes the need for Vue event listeners or complex state bubbling to highlight the field border. This reduces JavaScript overhead and simplifies component logic. FYI [MDN :has()](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has). Reordered Tailwind classes to move `transition-all` to the end, following official best practices. Groups layout/shape first, followed by interaction states, and finally animations. This improves code readability and maintainability. ## Screenshots before 12efd5721fb792a7e2dab7e022c2bed6 after e5ffec0a34d3b237c4fca9818ec598dd ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9456-fix-update-WidgetLayoutField-border-styling-31b6d73d36508193a31ed02bfdef414f) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia --- .../vueNodes/widgets/components/layout/WidgetLayoutField.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vue b/src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vue index 5a1fa7af9b..67f71d1192 100644 --- a/src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vue +++ b/src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vue @@ -33,7 +33,7 @@ const hideLayoutField = useHideLayoutField()