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:
Sam El-Husseini
2019-10-30 09:53:36 -07:00
committed by GitHub
parent 7d174727b0
commit f3d978d553

View File

@@ -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');