fix(calendar): focusCentralDate function should only use buttons inside the dates table (#2072)
This commit is contained in:
parent
b89d889fd5
commit
9b9485dbaa
2 changed files with 9 additions and 1 deletions
5
.changeset/khaki-wasps-worry.md
Normal file
5
.changeset/khaki-wasps-worry.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@lion/ui': patch
|
||||
---
|
||||
|
||||
[calendar] focusCentralDate function should only use buttons inside the dates table
|
||||
|
|
@ -250,7 +250,10 @@ export class LionCalendar extends LocalizeMixin(LitElement) {
|
|||
}
|
||||
|
||||
focusCentralDate() {
|
||||
const button = /** @type {HTMLElement} */ (this.shadowRoot?.querySelector('[tabindex="0"]'));
|
||||
const datesTable = /** @type {HTMLElement} */ (
|
||||
this.shadowRoot?.querySelector('#js-content-wrapper')
|
||||
);
|
||||
const button = /** @type {HTMLElement} */ (datesTable.querySelector('[tabindex="0"]'));
|
||||
button.focus();
|
||||
this.__focusedDate = this.centralDate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue