Support full set of selectable input types
See original GitHub issueJSDOM does not support the full list of selectable input types (according to WHATWG) and throws an exception if an unsupported element is selected. Please update the _allowSelection
condition to include the full list of supported input types.
List of selectable input types according to WHATWG:
- Text (type=text)
- Search (type=search)
- URL (type=url)
- Telephone (type=tel)
- E-mail (type=password)
- Password (type=password)
- Date (type=date)
- Month (type=month)
- Week (type=week)
- Time (type=time)
- Local Date and Time (type=datetime-local)
- Number (type=number)
- Color (type=color)
- File Upload (type=file)
/source https://html.spec.whatwg.org/multipage/forms.html#the-input-element
Besides the condition update I suggest to fail select calls on unsupported input types silently as propose by WHATWG:
In the case of input elements, if the control has no text field, then the method must do nothing.
/source https://html.spec.whatwg.org/multipage/forms.html#dom-textarea/input-select
Many thanks in advance! 🙇
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
<input>: The Input (Form Input) element - HTML
A push button with no default behavior displaying the value of the value attribute, empty by default. ... A check box allowing single...
Read more >Reference: Block elements - Slack API
Block elements can be used inside of section , context , input and actions layout blocks. Our overview of app surfaces that support...
Read more >HTML Input Types - W3Schools
This chapter describes the different types for the HTML <input> element. HTML Input Types. Here are the different input types you can use...
Read more >Forms - Bootstrap
Textual form controls—like <input> s, <select> s, and <textarea> s—are styled with the .form-control class. Included are styles for general appearance, focus ...
Read more >lightning-input - documentation - Salesforce Developers
Checkboxes let you select one or more options. lightning-input type="checkbox" is useful for creating single checkboxes. If you are working with a group...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll hop on this if you don’t have time @orlandohohmeier, I helped with the original implementation.
This can be closed I think.