Skip to content

Remove selectionStart polyfill? #11806

@gaearon

Description

@gaearon

Looking at this code:

if ('selectionStart' in input) {
// Modern browser with input or textarea.
selection = {
start: input.selectionStart,
end: input.selectionEnd,
};
} else {
// Content editable or old IE textarea.
selection = ReactDOMSelection.getOffsets(input);
}

When would selectionStart not exist? According to http://help.dottoro.com/ljtfkhio.php, only in IE8. (It might be wrong though.)

It would be nice to check, and remove the relevant code if it's supported everywhere else.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions