microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
727 stars 638 forks source link

Mac: Mouse focus changed when dragging code from toolbox #4060

Open Sheila111 opened 3 years ago

Sheila111 commented 3 years ago

Describe the bug Mac: Mouse focus changed when dragging code from toolbox

Steps to reproduce the behavior 1.Navigate to https://makecode.microbit.org/beta 2.Dragg code from toolbox and observe mouse focus

Expect behavior Mouse focus won't change when dragging code from toolbox 2

Actual behavior Mac: Mouse focus changed when dragging code from toolbox 1

Additional context 1.OS: Mac 2.makecode.microbit.org version: 3.1.81 3.Microsoft MakeCode version: 6.13.29

abchatra commented 3 years ago

Probably fixed with latest update.

livcheerful commented 3 years ago

@jwunderl tested this for me on his Mac, and looks like Monaco 0.24.0 doesn't fix this - but he also says it doesn't feel TOO too weird

jwunderl commented 3 years ago

To summarize current behavior; if the last line is empty and you drag into the space below any monaco lines, it bumps the cursor up to the beginning of the first line. If the last line has any content in it (even whitespace) then it moves cursor to the closest character (that is, it acts as if the y position of the mouse is on the line itself).

The first case feels a bit buggy / ideally it would all behave consistently as the second case, but it doesn't feel urgent to me - I personally expect to drag the snippet to where I want it to go in the first place. I'm not really sure what the expected behavior when you drag the snippet below the workspace is in the first place, besides possibly 'insert as new last line".