n1k0/casperjs — Issue #5: Adding events when filling form
Author: marchugon
Created: 2011-11-08 14:09:58+00:00
State: open

When calling

```javascript
self.fill('form[name=f]', { q: 'casperjs' }, false);
```

The 'focus' and 'blur' event are not called. If (in my case) you're looking for js things to occur when the field is filled, you won't see them.

My current working workaround is

```javascript
self.evaluate(function() {document.querySelector('form[name=f] input[name=q]').focus()});
self.fill('form[name=f]', { q: 'casperjs' }, false);
self.evaluate(function() {document.querySelector('form[name=f] input[name=q]').blur()});
```

It should be "natural" to call these events automatically in casper, like it's happening in a real brower ;)