Use el.value as the default for getInputValue() to simplify things.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -148,8 +148,8 @@ unbindEvent = (el, event, fn) -> | ... | @@ -148,8 +148,8 @@ unbindEvent = (el, event, fn) -> |
148 | # Returns the current input value for the specified element. | 148 | # Returns the current input value for the specified element. |
149 | getInputValue = (el) -> | 149 | getInputValue = (el) -> |
150 | switch el.type | 150 | switch el.type |
151 | when 'text', 'textarea', 'password', 'select-one', 'radio', 'number' then el.value | ||
152 | when 'checkbox' then el.checked | 151 | when 'checkbox' then el.checked |
152 | else el.value | ||
153 | 153 | ||
154 | # Returns an event binding routine for the specified event. | 154 | # Returns an event binding routine for the specified event. |
155 | eventBinding = (event) -> (el, bind, unbind) -> | 155 | eventBinding = (event) -> (el, bind, unbind) -> | ... | ... |
-
Please register or sign in to post a comment