mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Add an RLM after Flyout button text for RTL languages (#3366)
* Add an RLM after Flyout button text for RTL languages
This commit is contained in:
@@ -152,7 +152,12 @@ Blockly.FlyoutButton.prototype.createDom = function() {
|
||||
'text-anchor': 'middle'
|
||||
},
|
||||
this.svgGroup_);
|
||||
svgText.textContent = Blockly.utils.replaceMessageReferences(this.text_);
|
||||
var text = Blockly.utils.replaceMessageReferences(this.text_);
|
||||
if (this.workspace_.RTL) {
|
||||
// Force text to be RTL by adding an RLM.
|
||||
text += '\u200F';
|
||||
}
|
||||
svgText.textContent = text;
|
||||
if (this.isLabel_) {
|
||||
this.svgText_ = svgText;
|
||||
this.workspace_.getThemeManager().subscribe(this.svgText_, 'flyoutText', 'fill');
|
||||
|
||||
Reference in New Issue
Block a user