Bug: `toggleContinueSelect` & `toggleContinueSelectWithoutDeselect`
SidIcarus opened this issue · comments
Environments
- Framework name: VanillaJS
- Component version: 1.20.3
- Testable Address
Description
Use case 1:
- no element is selected
toggleContinueSelect
key is pressed- in my example,
shift
is used
- in my example,
- element is clicked on to be selected
problem: element is selected and immediately deselected
Use case 2:
- While selecting multiple elements with
toggleContinueSelect
, if you have elements selected and their parentElement is selected - select parent and deselect children
problem: parent is selected, and immediately deselected
I've seen your suggestion in #97; enabling toggleContinueSelectWithoutDeselect
with the same value as toggleContinueSelect
resolves the problems above but then I am unable to deselect elements using that same key.
Would you have any suggestions on how to go about resolving the above?
Note: I have resolved the inverse of Use case 2 (parent is first selected then children are attempted to be selected using toggleContinueSelect
) in the link I provided.
thanks.
- The problem in Case 1 has been identified and will be corrected.
- The problem in Case 2 will be checked and corrected.
you can check by isTrusted
event property in Moveable
(0.43.1)
Moveable
<Moveable
onClick={e => {
if (e.isTrusted) {
selecto.clickTarget(e.inputEvent, e.inputTarget);
}
}}
onClickGroup={e => {
if (e.isTrusted) {
selecto.clickTarget(e.inputEvent, e.moveableTarget);
}
}}
/>
Thank you!