question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support full set of selectable input types

See original GitHub issue

JSDOM 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:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
probablyupcommented, Feb 19, 2016

I’ll hop on this if you don’t have time @orlandohohmeier, I helped with the original implementation.

0reactions
probablyupcommented, Jul 23, 2016

This can be closed I think.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found