1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Improve focus handling by relying on Javascript focus()

This commit is contained in:
Joe Ferris 2012-07-10 20:53:57 -07:00
parent ba28a2a20a
commit a4eb401da4
2 changed files with 2 additions and 4 deletions

View file

@ -31,6 +31,7 @@ describe Capybara::Webkit, 'compatibility with selenium' do
compare_events_for_drivers(:reusable_webkit, :selenium) do
visit "/"
fill_in "One", :with => "some value"
fill_in "One", :with => "a new value"
fill_in "Two", :with => "other value"
click_button "Submit"
end

View file

@ -250,10 +250,7 @@ Capybara = {
},
focus: function(index) {
if (this.focusedIndex)
this.trigger(this.focusedIndex, "blur");
this.focusedIndex = index;
this.trigger(index, "focus");
this.nodes[index].focus();
},
selectOption: function(index) {