jnicklas/capybara — pull request #870 by DouweM (2012-11-16 22:13:20+00:00)
Title: Properly clear input by moving to the end before backspacing in Selenium driver

Previously, if the input element was already had focus, but the cursor was somewhere other than at the end, `Selenium::Node#set` would not properly remove all of the input's previous content because the characters after the cursor were not "backspaced."

With this change, we first move to end of the content by hitting the right arrow key repeatedly, before hitting backspace repeatedly.