Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent scrolling on browser window resize (RTL vs LTR) #8637

Open
1 task done
mikeharv opened this issue Nov 1, 2024 · 0 comments
Open
1 task done

Inconsistent scrolling on browser window resize (RTL vs LTR) #8637

mikeharv opened this issue Nov 1, 2024 · 0 comments
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@mikeharv
Copy link
Contributor

mikeharv commented Nov 1, 2024

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

The Blockly workspace is anchored to the left in both LTR and RTL modes. Because of this, the blocks on the workspace move unexpectedly when changing the size of the window in RTL mode.

On Code.org's platform, we have a fixed edge at the top and on the side of the toolbox. When the blocks hit the toolbox, Blockly bumps them back into bounds, which changes their positions. This is especially problematic for immovable top blocks. (See Code.org RTL with Fixed Edges video.) This can be partially mitigated by turning off fixed edges, but this is not a good solution for us. (See Code.org RTL with No Fixed Edges video.)

Reproduction steps

  1. Open the Blockly playground in LTR mode: https://blockly-demo.appspot.com/static/tests/playground.html
  2. Drag out a couple of blocks.
  3. Resize your browser window. Observe that the blocks do not shift, relative to the toolbox on the left.
  4. Switch to RTL mode.
  5. Resize your browser window again. Observe that the blocks move towards the toolbox on the right.
  6. Greatly reduce the width of the workspace and then expand it again. Observe that the blocks no longer appear to be in their original positions.

Stack trace

No response

Screenshots

Blockly Playground LTR

ltr.mp4

Blockly Playground RTL

rtl.mp4

Code.org LTR

2024-11-01.13-55-01.2024-11-01.13_59_57.mp4

Code.org RTL

Fixed edges

fixed.mp4

No fixed edges

unfixed.mp4

Browsers

No response

@mikeharv mikeharv added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Nov 1, 2024
@cpcallen cpcallen removed the issue: triage Issues awaiting triage by a Blockly team member label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

2 participants