Skip to content

Commit

Permalink
feat(client) drop no longer needed workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Nov 16, 2023
1 parent f446fa1 commit cc18f16
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
26 changes: 0 additions & 26 deletions spot-client/src/common/detection/detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,3 @@ export function isWirelessScreenshareSupported() {
&& jitsiBrowserDetection.supportsGetDisplayMedia()
&& !jitsiBrowserDetection.isElectron();
}

/**
* Returns whether or not the current environment has a bug where caret-color
* is not respected on the initial focus of a text input element.
*
* @returns {boolean}
*/
export function hasVisibleCaretOnInitialFocus() {
return _hasReactNativeOnlyAttributes()
&& _isIOSWebView()
&& _isMaybeIOS13();
}

/**
* Detects whether or not the current environment is in iOS 13. Starting with
* iOS 13, the user agent may return that it is actually macOS, and bowser does
* not have a workaround for this yet. As such, there is an assumption that
* a mobile platform with a certain macOS version may be 13.
*
* @private
* @returns {boolean}
*/
function _isMaybeIOS13() {
return (browser.getOSName() === 'iOS' && browser.getOSVersion().startsWith('13'))
|| (browser.getPlatformType() === 'mobile' && browser.getOSVersion().startsWith('10.15'));
}
6 changes: 0 additions & 6 deletions spot-client/src/common/ui/components/code-input/CodeInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
hasVisibleCaretOnInitialFocus,
isAutoFocusSupported
} from 'common/detection';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -144,11 +143,6 @@ export default class CodeInput extends React.Component {
*/
_onRootClick() {
if (!this.state.isFocused) {
if (hasVisibleCaretOnInitialFocus()) {
this._inputRef.current.focus();
this._inputRef.current.blur();
}

this._inputRef.current.focus();
}
}
Expand Down

0 comments on commit cc18f16

Please sign in to comment.