Bug 429691

Summary: Adding a symbol from the Vector Library is very sensitive to timing
Product: [Applications] krita Reporter: Anna Medonosova <anna.medonosova>
Component: UsabilityAssignee: sh_zam <shzam>
Status: ASSIGNED ---    
Severity: normal CC: shzam
Priority: NOR    
Version First Reported In: 4.4.1   
Target Milestone: ---   
Platform: Android   
OS: Android 10.x   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen recording of the issue

Description Anna Medonosova 2020-11-26 14:35:50 UTC
Created attachment 133669 [details]
screen recording of the issue

SUMMARY

In the desktop version of Krita, symbols from the Vector Library dockers can be drag&dropped onto the canvas. On Android, I can technically double-tap and drag the symbol (though it takes some trial and error). However, I have to be very quick, otherwise the dragged symbol disappears before I reach the canvas and the symbol is not added.


STEPS TO REPRODUCE
1. Create a document
2. Enable the Vector Library docker
3. Drag a symbol from the docker onto the canvas


OBSERVED RESULT
The symbol disappears while dragging and is not added to the canvas.


EXPECTED RESULT
The symbol remains under cursor until it is dropped onto the canvas. Or a different way to add the symbol (e.g. a button in the docker)
Comment 1 sh_zam 2021-01-17 10:26:36 UTC
Hello Anna!

Yesterday, I spent some time looking into this bug. I listened on the events to
see what was going on. Turns out this works as you'd expected.

When you do a double tap, the first tap is done and released, the next tap is
considered both as a MouseButtonPress and MouseButtonDblClick (both being
synthetic). The MouseButtonPress is then recognized as a drag event and for
reasons I didn't bother investigating, MouseButtonDblClick is released after
a while (there's a huge delay!), which causes the issue in the video (because
drag is cancelled).

So, the double tap is the problem, if you drag without double tapping things work
as you'd expect. I am not sure if this is the way it should be or the
double-tapping is the right way.