The event listener receives an Event object, not the element from which the event originated.
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -31,7 +31,8 @@ class Rivets.Binding | ... | @@ -31,7 +31,8 @@ class Rivets.Binding |
31 | Rivets.config.adapter.subscribe @context, @keypath, (value) => @set value | 31 | Rivets.config.adapter.subscribe @context, @keypath, (value) => @set value |
32 | 32 | ||
33 | if @type in bidirectionals | 33 | if @type in bidirectionals |
34 | @el.addEventListener 'change', (el) => | 34 | @el.addEventListener 'change', (e) => |
35 | el = e.target or e.srcElement | ||
35 | Rivets.config.adapter.publish @context, @keypath, getInputValue el | 36 | Rivets.config.adapter.publish @context, @keypath, getInputValue el |
36 | 37 | ||
37 | # Parses and stores the binding data for an entire view binding. | 38 | # Parses and stores the binding data for an entire view binding. | ... | ... |
-
Please register or sign in to post a comment