We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52e6385 commit d7108d3Copy full SHA for d7108d3
packages/uui-base/lib/mixins/SelectableMixin.ts
@@ -95,9 +95,13 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
95
96
readonly #onClick = (e: Event) => {
97
const composePath = e.composedPath();
98
- const target = composePath[0] as HTMLElement;
+ const isAnchorTag = composePath.some(el => {
99
+ const element = el as HTMLElement;
100
+ return element.tagName === 'A';
101
+ });
102
- if (target.tagName === 'A') return;
103
+ // never select when clicking on a link
104
+ if (isAnchorTag) return;
105
106
const isSelectable =
107
this._selectable || (this.deselectable && this.selected);
0 commit comments