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:
parent
ba28a2a20a
commit
a4eb401da4
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue