We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STR:
Behavior can be observed here, https://react-component.github.io/calendar/examples/antd-range-calendar.html
Proposed fix - disable setSelectionRange on safari (tested locally),
+ const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); ... componentDidUpdate() { - if (dateInputInstance && this.state.hasFocus && !this.state.invalid && - !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) { - dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd); + if (!isSafari) { // Exclude safari, since it has a bug with setSelectionRange + if (dateInputInstance && this.state.hasFocus && !this.state.invalid && + !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) { + dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd); + } } }
Question - Do we even need setSelectionRange? Does anyone use it?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
STR:
Behavior can be observed here,
https://react-component.github.io/calendar/examples/antd-range-calendar.html
Proposed fix - disable setSelectionRange on safari (tested locally),
Question - Do we even need setSelectionRange? Does anyone use it?
The text was updated successfully, but these errors were encountered: