fix: lion-calendar: when determining if user interacted with a day button we no longer examine event.target but event.composedPath()[0] since it otherwise fails in Firefox 111+
This commit is contained in:
parent
5b8d655f10
commit
12f1800806
3 changed files with 7 additions and 2 deletions
5
.changeset/tough-rivers-punch.md
Normal file
5
.changeset/tough-rivers-punch.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
lion-calendar: when determining if user interacted with a day button we no longer examine event.target but event.composedPath()[0] since it otherwise fails in Firefox 111+
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -22334,7 +22334,7 @@
|
||||||
},
|
},
|
||||||
"packages/ui": {
|
"packages/ui": {
|
||||||
"name": "@lion/ui",
|
"name": "@lion/ui",
|
||||||
"version": "0.1.5",
|
"version": "0.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bundled-es-modules/message-format": "^6.0.4",
|
"@bundled-es-modules/message-format": "^6.0.4",
|
||||||
|
|
|
||||||
|
|
@ -753,7 +753,7 @@ export class LionCalendar extends LocalizeMixin(LitElement) {
|
||||||
const isDayButton = /** @param {HTMLElement} el */ el =>
|
const isDayButton = /** @param {HTMLElement} el */ el =>
|
||||||
el.classList.contains('calendar__day-button');
|
el.classList.contains('calendar__day-button');
|
||||||
|
|
||||||
const el = /** @type {HTMLElement & { date: Date }} */ (ev.target);
|
const el = /** @type {HTMLElement & { date: Date }} */ (ev.composedPath()[0]);
|
||||||
if (isDayButton(el)) {
|
if (isDayButton(el)) {
|
||||||
this.__dateSelectedByUser(el.date);
|
this.__dateSelectedByUser(el.date);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue