Check for duplicates
Description
When a block is too wide to fit on the screen, focusing its inputs causes the block's left edge align to the flyout, which makes the input go offscreen (or at least parts of the screen where it shouldn't be). Also, it's annoying to keep dragging the block back to its original position. Sometimes it moves the block so far that it's hard to drag it back.
Reproduction steps
- Open a Scratch or a MakeCode editor on a mobile
- Combine blocks until it's so wide that you can't see the entire thing at once
- in the MakeCode editor it doesn't happen with some input types (those that open a popup with a text box), but it happens with eg. the speed input
- Scroll to the rightmost input and try to type into it
On a computer you can reproduce the bug by making a resize event after focusing the input. I think it happens when the virtual keyboard resizes the window
Priority
Work effort: I think it can be fixed by editing this function to scroll instead of moving the blocks, but I didn't test this
Impact: it can happen to anyone who makes a long block on mobile
Workaround: manually drag the block back to the original position after editing the field
Stack trace
Screenshots
Before the bug

After closing the keyboard

Browsers
Android mobile, Chrome desktop
Check for duplicates
Description
When a block is too wide to fit on the screen, focusing its inputs causes the block's left edge align to the flyout, which makes the input go offscreen (or at least parts of the screen where it shouldn't be). Also, it's annoying to keep dragging the block back to its original position. Sometimes it moves the block so far that it's hard to drag it back.
Reproduction steps
On a computer you can reproduce the bug by making a
resizeevent after focusing the input. I think it happens when the virtual keyboard resizes the windowPriority
Work effort: I think it can be fixed by editing this function to scroll instead of moving the blocks, but I didn't test this
Impact: it can happen to anyone who makes a long block on mobile
Workaround: manually drag the block back to the original position after editing the field
Stack trace
Screenshots
Before the bug

After closing the keyboard

Browsers
Android mobile, Chrome desktop