Skip to content

Commit

Permalink
Fix element clear when document is undefined
Browse files Browse the repository at this point in the history
Regression in legacy Firefox driver since b436822
  • Loading branch information
p0deje committed Mar 7, 2018
1 parent 14e4f56 commit 37bd7db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/atoms/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bot.action.clear = function(element) {
element.value = '';
bot.events.fire(element, bot.events.EventType.CHANGE);
bot.events.fire(element, bot.events.EventType.BLUR);
bot.action.LegacyDevice_.focusOnElement(document.body);
bot.action.LegacyDevice_.focusOnElement(bot.getDocument().body);
} else if (bot.dom.isElement(element, goog.dom.TagName.INPUT) &&
(element.getAttribute('type') && element.getAttribute('type').toLowerCase() == "number")) {
// number input fields that have invalid inputs
Expand Down

0 comments on commit 37bd7db

Please sign in to comment.