From 1283a696a5380ff7c07592aa1aba245db23f4669 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 12 Mar 2025 14:22:23 -0400 Subject: [PATCH] fix switch + tooltip behavior (#793) --- docs/docs/resources/changelog.md | 1 + src/components/switch/switch.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/docs/resources/changelog.md b/docs/docs/resources/changelog.md index cbea1f20e..275fd9702 100644 --- a/docs/docs/resources/changelog.md +++ b/docs/docs/resources/changelog.md @@ -25,6 +25,7 @@ During the alpha period, things might break! We take breaking changes very serio - Added a `pink` scale to all color palettes - Tweaked hues of all color palettes to make them more distinct and make their hues more intentional - Dropped `violet` and `teal`, instead using `purple` and `cyan` (this is not just a renaming, the colors have been adjusted too). +- Fixed a bug in `` that caused tooltips to work incorrectly when toggling the switch ### Design Tokens diff --git a/src/components/switch/switch.ts b/src/components/switch/switch.ts index 74d5a7fb7..47a9bcdf4 100644 --- a/src/components/switch/switch.ts +++ b/src/components/switch/switch.ts @@ -49,6 +49,7 @@ import styles from './switch.css'; */ @customElement('wa-switch') export default class WaSwitch extends WebAwesomeFormAssociatedElement { + static shadowRootOptions = { ...WebAwesomeFormAssociatedElement.shadowRootOptions, delegatesFocus: true }; static shadowStyle = [formControlStyles, sizeStyles, styles]; static get validators() {