selecto icon indicating copy to clipboard operation
selecto copied to clipboard

The isDouble is always return false in onSelectEnd.

Open xueerli opened this issue 3 years ago • 6 comments

Environments

  • Framework name: react
  • Framework version: 16.13.1
  • Component name: react-selecto
  • Component version: 1.7.4
  • Testable Address(optional): https://codesandbox.io/s/tender-moon-6rc3i?file=/src/App.tsx

Description

When i double click the element, onSelectEnd is triggered only once and isDouble is false(expectation is true). When i double click the blank space, onSelectEnd is triggered twice. IsDouble is false in first event and it is true in second event. I checked the inputEvent type is 'mousedown'. Does‘t meet the following conditions.

if (inputEvent && inputEvent.type !== "mousedown" && inputEvent.type !== "touchstart") {
         this.trigger("dragEnd", {
                isDouble: false,
                isDrag: false,
                ...e,
                rect,
            });
        }

xueerli avatar Nov 04 '20 09:11 xueerli

@xueerli

I'll check it. Thank you :)

daybrush avatar Nov 05 '20 18:11 daybrush

@daybrush Thank you too. And i have an other problem. Similar to #8, where i added a comment . In the onDragStart event, i used isMoveableElement to stop, but I cannot switch the elements in the selection group.

xueerli avatar Nov 06 '20 03:11 xueerli

@xueerli

  • selecto 1.9.1
  • react-selecto 1.9.1
  • preact-selecto 1.8.1
  • ngx-selecto 1.9.1
  • svelte-selecto 1.9.1
  • lit-selecto 1.9.2

selecto's new version is released. Check it again.

daybrush avatar Nov 08 '20 19:11 daybrush

@daybrush Unfortunately, when i updated it to 1.9.1, the selectoRef.current.clickTarget in onClickGroup event doesn't work. #8

xueerli avatar Nov 09 '20 10:11 xueerli

@xueerli

  • selecto 1.9.2
  • react-selecto 1.9.2
  • preact-selecto 1.8.2
  • ngx-selecto 1.9.2
  • svelte-selecto 1.9.2
  • lit-selecto 1.9.2

oh, sorry. new version is released. Check it again.

daybrush avatar Nov 09 '20 19:11 daybrush

@daybrush Thank you very much.

xueerli avatar Nov 10 '20 07:11 xueerli