Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery's live events don't work #36

Open
madadam opened this issue Oct 1, 2010 · 4 comments
Open

jQuery's live events don't work #36

madadam opened this issue Oct 1, 2010 · 4 comments

Comments

@madadam
Copy link

madadam commented Oct 1, 2010

Hello there,

Seems capybara-envjs has troubles with jQuery's live events. If an event listener is bound using bind(), everything works fine, but if using live(), it does not. I put together simple example to demonstrate it:

http://github.com/madadam/capybara-envjs-jquery-live-failure-example

Just run ruby -rubygems test.rb to see it. With selenium driver, it works fine, with envjs, it fails.

@smparkes
Copy link
Owner

smparkes commented Oct 1, 2010

Yup. Known issue. But so far, no one that has the need to make it work has stepped up to work on it, I'm afraid.

@madadam
Copy link
Author

madadam commented Oct 1, 2010

I'd step up, why not :) Is the problem only in capybara-envjs or is it envjs itself?

@smparkes
Copy link
Owner

smparkes commented Oct 1, 2010

That'd be cool, if you could.

The problem is in envjs itself and it might be fixed in the Java master (we want to remerge, but it's going take a chunk of time we never seem to find ... the java master underwent a big reorg after the ruby port, before a merge).

The relevant code in the ruby branch is in window/event.js, dispatchEvent in particular. I haven't been tracking what this looks like in the java master lately.

@kevintraver
Copy link

If you try calling a focus before clicking the element, it seems to work:

page.execute_script %Q{ $("#derp").trigger("focus") }
find("#derp").click

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants