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

$fromDOMEvent doesn't work with events that don't bubble up #32

Closed
ckhampus opened this issue Feb 15, 2017 · 0 comments
Closed

$fromDOMEvent doesn't work with events that don't bubble up #32

ckhampus opened this issue Feb 15, 2017 · 0 comments

Comments

@ckhampus
Copy link

ckhampus commented Feb 15, 2017

Hi!

It seems that the event delegation in $fromDOMEvent doesn't work with events that don't bubble up, like focus or blur.

It seems that, for events that don't bubble, you want to use event capturing when adding the event listener.

Took a quick look how CycleJS does it. They just look up the event in a list of events (https://github.com/cyclejs/cyclejs/blob/master/dom/src/MainDOMSource.ts#L28), and determine if the event should captured or not based on that (https://github.com/cyclejs/cyclejs/blob/master/dom/src/MainDOMSource.ts#L59).

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

1 participant