Observables derived from inputs do not trigger notifications. #10

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

2 participants

@airportyh

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
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

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

@dominictarr
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

Okay, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment