Please help me understand what Mouse_Down events do on touchscreens

I find myself still failing to understand why when using HTML5 the Mouse_Down event fires twice when someone presses on a touchscreen. I reported this behaviour as a bug in openFL months ago, it was fixed/went away, but returned in more recent versions, so i can only assume it it me that is failing to understand how Mouse_Down events should be handled properly on touchscreen devices, and devices with both touchscreens and pointers. Any help or insightful comments would be greatly appreciated.
At a basic level, here is a simple project main.hx - it creates some text, which shows how many Mouse_Down events have occured. Please could someone help my understanding of why it jumps in 2’s on touchscreens, rather than 1’s on desktop browsers !?


import flash.display.Sprite;
import flash.text.TextField;
import flash.Lib;

class Main extends Sprite {
    var textField:TextField;
    var count:Int = 0;
    public function new () {
        super ();
        textField = new TextField ();
        textField.x = 50;
        textField.y = 50;
        textField.width = 300;
        textField.text = " Mouse_Down count = ";
        addChild (textField);
        Lib.current.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
    function onMouseDown(e:MouseEvent) {
        count ++;
        textField.text = " Mouse_Down count = " + Std.string(count);

Some browsers report only touch screen events, some report only mouse, and some report both. The latter is the cause of the above behavior. I thought we did have this handled, but perhaps there was some regression in behavior. We want to always dispatch a mouse event, even if the target device reports only touch, but we do only want to create our own simulated mouse event if the device has not reported one already. Would you mind creating an issue for this?

So the behaviour i’m experiencing isn’t as intended after all ?? I had reported it as a bug a few weeks ago, but without a response - how would i go about “creating an issue” ?

Just go to or and create an issue :slight_smile:

ok - i have done - should i be reporting bugs there, rather than here on th ebugs forum as i have done with this issue (and others) in the past ?

If we’ve already established that something looks like a bug, then the best place to report bugs, keep track of them and ultimately mark them is fixed is going to be on GitHub, for myself or someone else to find. Here on the forums is the best place to discuss, as sometimes a behavior isn’t exactly a bug, or sometimes it takes some discussion to determine what’s really going on, and what the cause or desired behavior really is, so it will depend a little. I hope that makes sense :slight_smile: