Hi,
In "questions" I posted a couple of hours ago a question about detecting the end of a drag event. The start of a drag event is always working to detect, but the end "pressup in this case" not.
I thought that I was doing something wrong (which still is possible) but now I think that it might be a bug.
The democode at ZIM - SingleTouch Test - Code Creativity has the same problem. If you drag and release quickly, then the end of drag event is not firing (and in this case the image is not returning to its position).
I also posted an example by myself at ZIM - puzzeltest
There you get the same behaviour and the mouseup/pressup/end_of_drag isn't firing.
This code imports ZIM017 and I also tried with ZIM016.... -> same problem
And then I go to ZIM015 and -> BAM!!!!! the event fires perfectly.
Demo at ZIM - puzzeltest (exactly the same code, just another ZIM import)
So my wild guess is that somewhere between 015 and 016/17 something has gone wrong in code or something has been added to code that breaks this functionality.
I hope that this can be fixed since I'm pretty sure a lot of people use drag and drop in their apps an rely on the events.
Kind regards,
Bart
We can't seem to see the problem - it works for us. Can some others try? What platform are you testing on?
I'm not getting it when I import 017 or 016 and drag and drop really fast. Meaning click drag release in a fraction of a second. 015 captures it perfectly.
Tested under chrome 133.0.6943.142 mac and safari 18.3 (20620.2.4.11.5) both on mac.
reproduces 100% here
https://youtu.be/_83Lg-NdSdY for a video showing it happen
Can you try with a mousedown rather than a pressdown.
Both 015 and 016 call CreateJS 1.4.1 so if something happened it happened in ZIM - which is odd as the mousedown and pressup are pure CreateJS - ZIM really has nothing to do with it. The pressdown is a ZIM wrapper for the mousedown - so possibly has something to do with it - but the pressdown is working. Anyway - take off the shadow and do the test only with the log to the console.
Also, we will test on a mac too. Our test so far was on PC.
I can't see the video - it is private.
video is public now. I will redo the code with your suggestions in about 15 minutes and then let you know, but AFAIK I already did this also a couple of hours ago.
Fact is 015 works, 016 and 017 not with same code, but I'll follow up in 15/20 minutes. meanwhile the video is public
It is possible that it is a drag() issue where the drop on the drag is conflicting or cancelling a general press up. I think we did work on multitouch issues since 015. I would suggest, that since it works on a PC that you contact Apple and see if they can fix whatever their problem is. Hahaha. Kidding.
Try removing the drag() and see if you always are getting pressup events. You probably will. We will test on mac.
Here another movie that shows the problem while I have removed the shadow and used mousedown
I also did a test with removing drag() and can confirm that at this moment... I get all down and up events. (with 017)
So it could be that drag() is giving problems.
By the way: Tim Cook told me that I can't bug him in the next days because he is on a holiday 
1 Like
Can't reproduce it on our mac. That makes it kind of hard to debug. Will look into seeing what in the drag() might cause it. Are you using a mouse or trackpad?
Just tested on the mac of my wife and the one of my son too. All do it. I was hoping they wouldn't because maybe it was a caching problem on my mac (wife and sons mac don't know what ZIM is) but they all do the same. My mac is M1 iMac and the other 2 are a macbook air M2 and a macbook Pro M2
On my mac I was using an apple mouse and on the macs of wife and son the trackpad
Since I discovered this problem I just import V015 and everything works, but it is strange. For this project 015 will be enough, but I still think something is strange because it doesn't work on 016 and 017 with same code
Well... that is how updates and bugs happen. We make a change from version to version and it is possible that your code will not work the same.
This could be it. We added a stopImmediatePropagation() which would cancel outside events. We did this to solve another issue - iFrame issues. And everything worked for us - but perhaps it is an issue on the mac.
Con confirm that I can (unfortunately) reliably reproduce it here on 4 Macs using both Chrome and Safari and a combination of Magic Mouse and trackpads.
These are all changes after 015 which are in 016 and 017 ? Then it is very possible that some of these caused it, since 015 never gives me the problem
Okay - it is probably a drag() issue with the stopImmediatePropagation(). We will try and figure out what we were trying to fix with that and see if there is another way. Will let you know. Thanks for the report and testing.
1 Like
You're welcome. In the meanwhile for this puzzle game I'll stick to 015
Just adding this difference for a reference later - this is setting the hasMoved in a slideStop - probably not related as it was a regular drag.
1 Like
Do you happen to have singleTouch set to true anywhere?