Compare commits

...

2 Commits

Author SHA1 Message Date
Cory LaViska
5f34e48e10 Merge branch 'next' into dialog-drawer-focus 2025-10-15 10:26:35 -04:00
Cory LaViska
0b39ca6ca2 focus dialog on open; fixes #1302 2025-10-14 14:06:13 -04:00
3 changed files with 5 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
- Fixed a bug in `<wa-checkbox>` where its value would revert to `""` when checked / unchecked [pr:1547]
- Fixed a bug that caused icon button labels to not render in frameworks [issue:1542]
- Fixed a bug in `<wa-details>` that caused the `name` property not to reflect [pr:1538]
- Fixed a bug in `<wa-dialog>` and `<wa-drawer>` that prevented focus from being set on the dialog/drawer when opened [issue:1302]
- Fixed an overflow style that was causing tab group content to be unnecessarily truncated [issue:1401]
- Fixed a bug in `<wa-icon>` that caused icon buttons to render when non-text nodes were slotted in [issue:1475]

View File

@@ -197,6 +197,8 @@ export default class WaDialog extends WebAwesomeElement {
const elementToFocus = this.querySelector<HTMLButtonElement>('[autofocus]');
if (elementToFocus && typeof elementToFocus.focus === 'function') {
elementToFocus.focus();
} else {
this.dialog.focus();
}
});

View File

@@ -210,6 +210,8 @@ export default class WaDrawer extends WebAwesomeElement {
const elementToFocus = this.querySelector<HTMLButtonElement>('[autofocus]');
if (elementToFocus && typeof elementToFocus.focus === 'function') {
elementToFocus.focus();
} else {
this.drawer.focus();
}
});