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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tp/tp-table",
"version": "1.6.0",
"version": "1.6.1",
"description": "",
"main": "tp-table.js",
"scripts": {
+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(