Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Assertion Failed on type="tel" input field #2341

Closed
ora726 opened this issue Aug 26, 2011 · 11 comments
Closed

Assertion Failed on type="tel" input field #2341

ora726 opened this issue Aug 26, 2011 · 11 comments

Comments

@ora726
Copy link

ora726 commented Aug 26, 2011

Have noticed that when using a input of type tel the javascript console return an error "Assertion failed". Only this type of field seem to generate the problem. If the error is expander I get :
(anonymous function) :444
(anonymous function) :638
TheHTML looks like this :
...

    <div data-role="content">
        <form id="fpModifyUserInfo">
            <input type="text"  name="givenName"        class="handleChange"    placeholder="Given Name" />
            <input type="text"  name="surname"          class="handleChange"    placeholder="Surname" />
            <input type="email" name="emailAddress"     class="handleChange"    placeholder="Email Address" />
            <input type="tel"   name="phoneNumber"      class="handleChange"    placeholder="Phone Number" />
        </form>
        <ul data-role="listview" data-inset="true">
            <li><a buttonname="bModifyUserInfo" class="handleClick">Modify User Info</a></li>
        </ul>
    </div>

...
There is no javascript running on this particular field other than whatever jquery mobile does with it.
I have reproduced the same error in Safari (Mac OSX) and Chrome (Osx).
I use the latest jquery and jquery mobile b2.
The error does not create any problem with jquery mobile or my own code, so it seem to be a minor problem but I though somebody might be interested.

@toddparker
Copy link
Contributor

Can you please post a jsbin or jsfiddle test page so we can reproduce this? This page has a the: link
http://jquerymobile.com/test/docs/pages/page-links.html

@ora726
Copy link
Author

ora726 commented Sep 9, 2011

Dear Todd,
Sorry for the late rely, but I was not able to reproduce the same error in jsfiddle. There might be something in my app that create the console error but I was not able to identify it after taking out most of my code and web page step by step.
I'll let you know if I stumble on a solution.
Thanks for your time.
-R

@ora726 ora726 closed this as completed Sep 9, 2011
@toddparker
Copy link
Contributor

Thanks for following up ora726

@TedWood
Copy link

TedWood commented Sep 12, 2011

I'm observing the same thing. Changing all the "tel" fields in my app to "text" eliminates the error. jQuery 1.6.3

@TedWood
Copy link

TedWood commented Sep 12, 2011

jsFiddle: http://jsfiddle.net/TVxvX/1/

Have the Console open and click the "Submit" button in the Result pane. You'll see several very unhelpful "Assertion Failure" messages logged in console. Next, clear the console, change the input type to "text" and resubmit. No more errors.

jQuery is choking on type="tel" somehow.

Tested in:
Safari/WebKit/Chrome

@toddparker toddparker reopened this Sep 12, 2011
@toddparker
Copy link
Contributor

Re-opening. Thanks for the test page.

@rbiggs
Copy link

rbiggs commented Oct 19, 2011

Actually I see this on a page with no JavaScript, just HTML markup on Safari 5.1. When the Web inspector sees an input of type "tel" it chokes. However, this error is not generated in the nightly build of Safari Webkit. I'd say this is a bug in the Web inspector.

@toddparker
Copy link
Contributor

Ok, so we can re-close then?

@ora726
Copy link
Author

ora726 commented Oct 22, 2011

I ran my tests and could reproduce the pb only in safari, so it look like rblggs is right, it is in Safari.
Sorry for initially mentioning Chrome, I must have mixed browsers in my tests because chrome does not have the problem.
jquery-mobile is off the hook.
Thanks for your patience. and yes, suggest to close this issue.

@ora726 ora726 closed this as completed Oct 22, 2011
@toddparker
Copy link
Contributor

Thanks for following up ora726

@andreihurjui
Copy link

To not get the assertion failed error, and also get a numeric keyboard on iPad, I found this solution:

Zip Code:

http://stackoverflow.com/questions/593245/iphone-web-applications-and-specific-input-types

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants