react-bootstrap-typeahead
Version:
React typeahead with Bootstrap styling
10 lines • 382 B
JavaScript
/**
* Check if an input type is selectable, based on WHATWG spec.
*
* See:
* - https://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome/24175357
* - https://html.spec.whatwg.org/multipage/input.html#do-not-apply
*/
export default function isSelectable(inputNode) {
return inputNode.selectionStart != null;
}