Accessing selection API properties or calling methods on date and time input types throws TypeError

Originator:mattcg
Number:rdar://15122724 Date Originated:1 October 2013
Status:Open Resolved:
Product:Safari Product Version:iOS 7 (11A465)
Classification: Reproducible:100%
 
Summary:
In Safari on iOS 7.0.*, Accessing the selectionStart, selectionEnd or selectionDirection properties of an input element with type 'date' or 'time' throws a TypeError. Calling setSelectionRange on the same element also throws a TypeError.

Test case attached.

Steps to Reproduce:
1. Create an HTML document with two inputs, one of type date and the other of type time.
2. Add an onclick handler to each one that tries to get each of the selection properties and assign it to a variable.
3. Click on one of the inputs.
4. Observe a TypeError in the web inspector console.

Expected Results:
Accessing the properties or calling setSelectionRange should not throw a TypeError.

Actual Results:
A TypeError is thrown.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!