mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Handle RTL text (#1702)
* Handle RTL text Fixes issues related to dropdown menus (right align instead of left align), and bi-directional blocks (e.g., go to x: %1 y:%2, the ‘x: %1 y:%2’ is LTR, but should not be treated as LTR, when rendered in Hebrew it should be ‘%2 :y %1 :x’) * Set dropdownDiv direction Set the direction based on the rtl of the block that owns the menu. Note the css for dropdowns is completely different from blockly (`float` vs `absolute`) as a result of this PR from a couple of years ago: https://github.com/LLK/scratch-blocks/pull/632/ * use right-left-embed (rle) unicode to force RTL text, and left-right-embed for editing numbers.
This commit is contained in:
parent
b537fc4b99
commit
30a6e67ffa
3 changed files with 14 additions and 4 deletions
|
@ -1182,7 +1182,7 @@ Blockly.Css.CONTENT = [
|
|||
'.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {',
|
||||
/* Flip left/right positioning. */
|
||||
'float: right;',
|
||||
'margin-left: 6px;',
|
||||
'margin-right: -24px;',
|
||||
'}',
|
||||
|
||||
/* Keyboard shortcut ("accelerator") style. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue