Skip to content

Commit ef1cbae

Browse files
committed
revert to none preventing approach
1 parent 2bb4b11 commit ef1cbae

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,7 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
113113

114114
if (isSelectable === false) return;
115115

116-
if (this.#selectableTarget === this) {
117-
// If target is this, then only allow selection if the click is on the element itself.
118-
if (e.composedPath().indexOf(this.#selectableTarget) === 0) {
119-
if (e.type === 'keydown') {
120-
e.preventDefault(); // Do not want the space key to trigger a page scroll.
121-
}
122-
this.#toggleSelect();
123-
}
124-
} else if (e.composedPath().indexOf(this.#selectableTarget) !== -1) {
116+
if (e.composedPath().indexOf(this.#selectableTarget) !== -1) {
125117
if (e.type === 'keydown') {
126118
e.preventDefault(); // Do not want the space key to trigger a page scroll.
127119
}

0 commit comments

Comments
 (0)