Commit bdf357c
authored
Ensure node has focus before setting value (#280)
Currently the javascript used to set a field value will trigger
a "focus" event prior to updating a field however this does not
set the input as focused so any use of `document.activeElement`
will return the body element.
To fix this a call to `node.focus()` has been added before the
focus event to ensure `document.activeElement` will respond
correctly.1 parent dd6c46d commit bdf357c
3 files changed
Lines changed: 23 additions & 0 deletions
File tree
- lib/capybara/cuprite/javascripts
- spec
- features
- support/views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1540 | 1553 | | |
1541 | 1554 | | |
1542 | 1555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments