From 7f9539e64b06c2f7d33cea571b5991e5b226d1fc Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Fri, 20 Mar 2020 13:46:59 -0700 Subject: [PATCH] Fix inner html (#3759) * Fix ie11 bug by switching from innerHtml to innerText * Change to textContent --- core/dropdowndiv.js | 2 +- core/tooltip.js | 2 +- core/widgetdiv.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dropdowndiv.js b/core/dropdowndiv.js index e75bc73e1..3a6240ee9 100644 --- a/core/dropdowndiv.js +++ b/core/dropdowndiv.js @@ -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 = ''; }; diff --git a/core/tooltip.js b/core/tooltip.js index f2e8a9075..3bb20270d 100644 --- a/core/tooltip.js +++ b/core/tooltip.js @@ -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') { diff --git a/core/widgetdiv.js b/core/widgetdiv.js index b9504dab6..633021e78 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -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_);