Skip to content

Commit

Permalink
Fixed unwanted trailing tab in chrome 53
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorin committed Sep 16, 2016
1 parent 3e6c604 commit e8a96e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,11 @@ public function setValue($xpath, $value)
$existingValueLength = strlen($element->attribute('value'));
// Add the TAB key to ensure we unfocus the field as browsers are triggering the change event only
// after leaving the field.
$value = str_repeat(Key::BACKSPACE . Key::DELETE, $existingValueLength) . $value . Key::TAB;
$value = str_repeat(Key::BACKSPACE . Key::DELETE, $existingValueLength) . $value;
}

$element->postValue(array('value' => array($value)));
$this->trigger($xpath, 'change');
}

/**
Expand Down

0 comments on commit e8a96e0

Please sign in to comment.