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

Observables derived from inputs do not trigger notifications. #10

Open
airportyh opened this issue Sep 30, 2013 · 4 comments
Open

Observables derived from inputs do not trigger notifications. #10

airportyh opened this issue Sep 30, 2013 · 4 comments

Comments

@airportyh
Copy link
Contributor

An observable derived from an input, such as

var v = o.input(textfield)

Doesn't fire notifications to its change listeners. See gist here:

http://requirebin.com/?gist=6759398

Is this by design? Or should they be made to fire?

@dominictarr
Copy link
Owner

hmm, here is the code https://github.com/dominictarr/observable/blob/master/index.js#L119-L127

It's probably because input.value = 'hello' doesn't trigger oninput,
hmm, maybe it would work with onchange?

@airportyh
Copy link
Contributor Author

It works with neither. Setting the value of input elements do not trigger the events, I've just recheck now to make sure.

@dominictarr
Copy link
Owner

(Sorry for late reply, I've been offline at lxjs)

Hmm, I don't think there are any tests for this stuff either.
probably the html stuff should be a separate repo anyway.

I'd happily merge a pull request if you are interested in fixing this.

@airportyh
Copy link
Contributor Author

Okay, I'll take a look.

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

2 participants