react-bootstrap-typeahead
Version:
React typeahead with Bootstrap styling
16 lines (15 loc) • 482 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = isSelectable;
/**
* 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
*/
function isSelectable(inputNode) {
return inputNode.selectionStart != null;
}
;