Skip to content

Commit 5c631d3

Browse files
committed
add fallback to this
1 parent a7d67a9 commit 5c631d3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/uui-base/lib/mixins/SelectableMixin.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
9595

9696
readonly #onClick = (e: Event) => {
9797
const composePath = e.composedPath();
98+
99+
if (
100+
(this._selectable || (this.deselectable && this.selected)) &&
101+
this.selectableTarget === this
102+
) {
103+
this.#toggleSelect();
104+
return;
105+
}
106+
98107
if (
99108
(this._selectable || (this.deselectable && this.selected)) &&
100109
composePath.indexOf(this.selectableTarget) === 0

0 commit comments

Comments
 (0)