Prevent text selection on shift+click row selection
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user