Fix inner html (#3759)

* Fix ie11 bug by switching from innerHtml to innerText

* Change to textContent
This commit is contained in:
alschmiedt
2020-03-20 13:46:59 -07:00
committed by GitHub
parent d838778a4a
commit 7f9539e64b
3 changed files with 3 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ Blockly.DropDownDiv.getContentDiv = function() {
* Clear the content of the drop-down.
*/
Blockly.DropDownDiv.clearContent = function() {
Blockly.DropDownDiv.content_.innerHTML = '';
Blockly.DropDownDiv.content_.textContent = '';
Blockly.DropDownDiv.content_.style.width = '';
};

View File

@@ -294,7 +294,7 @@ Blockly.Tooltip.show_ = function() {
return;
}
// Erase all existing text.
Blockly.Tooltip.DIV.innerHTML = '';
Blockly.Tooltip.DIV.textContent = '';
// Get the new text.
var tip = Blockly.Tooltip.element_.tooltip;
while (typeof tip == 'function') {

View File

@@ -102,7 +102,7 @@ Blockly.WidgetDiv.hide = function() {
div.style.top = '';
Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_();
Blockly.WidgetDiv.dispose_ = null;
div.innerHTML = '';
div.textContent = '';
if (Blockly.WidgetDiv.rendererClassName_) {
Blockly.utils.dom.removeClass(div, Blockly.WidgetDiv.rendererClassName_);