scratchfoundation / scratch-vm

Virtual Machine used to represent, run, and maintain the state of programs for Scratch 3.0
http://scratchfoundation.github.io/scratch-vm/
BSD 3-Clause "New" or "Revised" License
1.2k stars 1.5k forks source link

Mouse Down sensing blocked by Monitor #1622

Open Mr-Dave2 opened 5 years ago

Mr-Dave2 commented 5 years ago

Expected Behavior

When the mouse is over a monitor and the mouse button is pressed the sense block for mouse down should report true.

Actual Behavior

When the mouse is over a monitor and the mouse button is pressed the sense block for mouse down reports false.

Steps to Reproduce

Drag out a forever block . Click on the My Variable monitor. Put into the forever block "set My Variable to [mouse down]" Click on the forever block.

Click on the stage - but not over the monitor- and hold down the mouse button. Then notice that the monitor says true.

Then do this while the mouse is over the monitor and notice it remains "false". But under Scratch 2 it will say True.

Operating System and Browser

Windows 7, Firefox 62.0.2

I have a test case here

And this bug affects this actual program https://beta.scratch.mit.edu/#245545359

thisandagain commented 5 years ago

/cc @ktbee @kchadha @paulkaplan

thisandagain commented 5 years ago

@ktbee We don't see this use case all that often, so this is likely to be low impact and is related to the choice to render monitors in the GUI.

paulkaplan commented 5 years ago

@thisandagain we could probably forward click events through the dom elements if we wanted to support this without rendering monitors in canvas

thisandagain commented 5 years ago

@paulkaplan Yup! I was thinking / hoping the same.