fix(toolbox) Copying with Ctrl+C toggles the chat. Fixes #9380

This commit is contained in:
Calinteodor 2021-06-16 19:36:36 +03:00 committed by GitHub
parent 0bd45a75d2
commit f991a93afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -626,6 +626,13 @@ class Toolbox extends Component<Props> {
enable: !this.props._chatOpen
}));
// Checks if there was any text selected by the user.
// Used for when we press simultaneously keys for copying
// text messages from the chat board
if (window.getSelection().toString() !== '') {
return false;
}
this._doToggleChat();
}