Drag vs. pointerdown event order

I have code that reacts to the pointerdown (to show the object as selected) and startdrag/enddrag/drag events (to drag it). Surprisingly, the startdrag event gets notified before the pointerdown one. I’d expect the opposite, as pointerdown seem the natural place for setting a selection state/visual, and dragging should happen after. This complicates my code to properly implement selection of multiple objects and their dragging. Is this expected?

I tried it in the phaser labs and that is what happens for me. The community might be able to help fix the code your using if you post it.

Thanks UltmateProGrammer. I can figure out the way to work around it, I was just curious whether this is intended, and if not if it could be “fixed”.

You can ask on GitHub and you might get a better answer.