diff --git a/javascript/atoms/action.js b/javascript/atoms/action.js
index 260e046ab8c33..df1457d63efda 100644
--- a/javascript/atoms/action.js
+++ b/javascript/atoms/action.js
@@ -119,7 +119,11 @@ bot.action.clear = function (element) {
// A single space is required, if you put empty string here you'll not be
// able to interact with this element anymore in Firefox.
bot.action.LegacyDevice_.focusOnElement(element);
- element.innerHTML = goog.userAgent.GECKO ? ' ' : '';
+ if (goog.userAgent.GECKO) {
+ element.innerHTML = ' ';
+ } else {
+ element.textContent = '';
+ }
var body = bot.getDocument().body;
if (body) {
bot.action.LegacyDevice_.focusOnElement(body);
diff --git a/javascript/atoms/test/action_test.html b/javascript/atoms/test/action_test.html
index 0a6677caa61c6..22d1f0934c939 100644
--- a/javascript/atoms/test/action_test.html
+++ b/javascript/atoms/test/action_test.html
@@ -5,6 +5,7 @@