Merge pull request #7954 from KDSBrowne/001-chat-input-focus
Fix chat input loss of focus
This commit is contained in:
commit
56a8302cfe
@ -94,9 +94,11 @@ class UserParticipants extends Component {
|
||||
return !isPropsEqual || !isStateEqual;
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
const { selectedUser } = this.state;
|
||||
|
||||
if (selectedUser === prevState.selectedUser) return;
|
||||
|
||||
if (selectedUser) {
|
||||
const { firstChild } = selectedUser;
|
||||
if (firstChild) firstChild.focus();
|
||||
|
@ -154,7 +154,6 @@ class UserDropdown extends PureComponent {
|
||||
|
||||
componentDidUpdate() {
|
||||
const { dropdownVisible } = this.props;
|
||||
if (!dropdownVisible) document.activeElement.blur();
|
||||
this.checkDropdownDirection();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user