Prevent text selection on shift+click row selection

This commit is contained in:
pk
2026-07-17 15:59:28 +02:00
parent 86d5a507eb
commit 2f3c81e4b2
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -635,6 +635,10 @@ export class TpTable extends DomQuery(LitElement) {
_handleRowClick(e) {
if (this.selectionMode !== 'row-click' || !this.selectable) return;
// Prevent the browser's native shift+click text selection since we're
// using shift+click for range selection.
e.preventDefault();
// Walk through composedPath to find the <tp-table-item> host, since
// lit-virtualizer puts rows in a shadow tree.
const itemEl = e.composedPath().find(