Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

include input elements w/ type="tel" or "number" when encoding form value #16

Merged
merged 1 commit into from

2 participants

@benhiller

Summary: Right now JX.DOM.convertFormToDictionary will skip over input
elements with type="tel" (or type="number"), which are valid values for
that attribute according to http://dev.w3.org/html5/markup/input.number.html
and http://dev.w3.org/html5/markup/input.tel.html.

This makes convertFormToListOfPairs include those input elements.

Test Plan: used in subsequent change which uses input type="tel" in
conjunction with JX.DOM.convertFormToDictionary.

bhiller include input elements w/ type="tel" or "number" when encoding form v…
…alue

Summary: Right now JX.DOM.convertFormToDictionary will skip over input
elements with type="tel" (or type="number"), which are valid values for
that attribute according to http://dev.w3.org/html5/markup/input.number.html
and http://dev.w3.org/html5/markup/input.tel.html.

This makes convertFormToListOfPairs include those input elements.

Test Plan: used in subsequent change which uses input type="tel" in
conjunction with JX.DOM.convertFormToDictionary.
04a9742
@epriestley epriestley merged commit 36c4de4 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2012
  1. include input elements w/ type="tel" or "number" when encoding form v…

    bhiller authored
    …alue
    
    Summary: Right now JX.DOM.convertFormToDictionary will skip over input
    elements with type="tel" (or type="number"), which are valid values for
    that attribute according to http://dev.w3.org/html5/markup/input.number.html
    and http://dev.w3.org/html5/markup/input.tel.html.
    
    This makes convertFormToListOfPairs include those input elements.
    
    Test Plan: used in subsequent change which uses input type="tel" in
    conjunction with JX.DOM.convertFormToDictionary.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/lib/DOM.js
View
3  src/lib/DOM.js
@@ -536,7 +536,8 @@ JX.install('DOM', {
var type = elements[ii].type;
var tag = elements[ii].tagName;
if ((type in {radio: 1, checkbox: 1} && elements[ii].checked) ||
- type in {text: 1, hidden: 1, password: 1, email: 1} ||
+ type in {text: 1, hidden: 1, password: 1, email: 1, tel: 1,
+ number: 1} ||
tag in {TEXTAREA: 1, SELECT: 1}) {
data.push([elements[ii].name, elements[ii].value]);
}
Something went wrong with that request. Please try again.