Open Bug 910551 Opened 7 years ago Updated 2 years ago

using javascript to get the type attribute of an input where type='time' returns "text"


(Core :: DOM: Core & HTML, defect, P5)

23 Branch
Gonk (Firefox OS)





(Reporter: jezra, Unassigned)


(Blocks 1 open bug)


(Keywords: dev-doc-needed)


(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36

Steps to reproduce:

1. create an html page containing <input type='time' id='time_input'>
2. run some javascript to check the input's 'type' attribute, Ex: 
var input = document.getElementById('time_input');

Actual results:

"text" was printed to the console

Expected results:

"time" should have been printed to the console
Attach a testcase as .html, please.
Flags: needinfo?(jezra)
Keywords: testcase-wanted
Flags: needinfo?(jezra)
Attachment #797270 - Attachment mime type: text/plain → text/html
Keywords: testcase-wanted
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Version: unspecified → 23 Branch
Ever confirmed: true
dom.experimental_forms = true fixes.
Yep.  This is the behavior the spec requires if time inputs are not supported yet.  You'd get the same with <input type="somethingILike">.
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 825294
I first notices this bug on FireFox OS where the input behaves as a time input but does not return the proper type when using javascript.
While this issue is similar to 825294, I found this issue while using the mobile Firefox browser on FireFoxOS and therefor I consider this to be a mobile browser issue. It should be noted that this issue does not exists on firefox browser for Android.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Resolution: DUPLICATE → ---
Last I've heard, "dom.experimental_forms" should be set to "true" in Firefox OS and Firefox for Android. Did that change?
Flags: needinfo?(jonas)
Not to my knowledge. I think we're still supporting most form controls in B2G.

Checking with Vivien that that should still remain true.
Flags: needinfo?(jonas)
(In reply to Jonas Sicking (:sicking) from comment #8)
> Checking with Vivien that that should still remain true.

What's the result?
Vivien, any reason that <input type=time> shouldn't work in B2G these days?
Flags: needinfo?(21)
(In reply to Jonas Sicking (:sicking) Please ni? if you want feedback from comment #10)
> Vivien, any reason that <input type=time> shouldn't work in B2G these days?

Nothing I know about. Sounds like the preference has landed in august though ( so I wonder if this could be that the  FirefosOS version used to check is too old.

Jezra, cwhich version of FirefosOS are you using?
Flags: needinfo?(21) → needinfo?(jezra)
I am using version on a ZTE Open
Flags: needinfo?(jezra)
(In reply to jezra from comment #12)
> I am using version on a ZTE Open

Makes sense then. The fix has landed only on 1.2 iirc.
Argh. The patch has landed in August but 2012. Maybe there is something else here.
Keywords: dev-doc-needed

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
From what i can see, the bug has been resolved and the correct type is reported
Blocks: html-forms
You need to log in before you can comment on or make changes to this bug.