Stop mouse event to prevent accidental trigger of nested tp-sortable elements.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-sortable",
|
"name": "@tp/tp-sortable",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-sortable.js",
|
"main": "tp-sortable.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class TpSortable extends EventHelpers(LitElement) {
|
|||||||
_onMouseDown(e) {
|
_onMouseDown(e) {
|
||||||
this._longPressTarget = closest(e.composedPath()[0], this.handle || this.selector, true);
|
this._longPressTarget = closest(e.composedPath()[0], this.handle || this.selector, true);
|
||||||
if (this._longPressTarget) {
|
if (this._longPressTarget) {
|
||||||
|
e.stopPropagation();
|
||||||
this._startX = e.detail.x;
|
this._startX = e.detail.x;
|
||||||
this._startY = e.detail.y;
|
this._startY = e.detail.y;
|
||||||
const path = e.composedPath();
|
const path = e.composedPath();
|
||||||
|
|||||||
Reference in New Issue
Block a user