Skip to content

Commit

Permalink
Merge pull request #23525 from daordonez11/hotfix-allowpastinginemoji
Browse files Browse the repository at this point in the history
[CP Staging] hotfix: avoid early prevent default to copy in normal inputs

(cherry picked from commit 91d2aab)
  • Loading branch information
mountiny authored and OSBotify committed Jul 25, 2023
1 parent 8ac7950 commit eec472b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,19 @@ class Composer extends React.Component {
* @param {ClipboardEvent} event
*/
handlePaste(event) {
event.preventDefault();

const isVisible = this.props.checkComposerVisibility();
const isFocused = this.textInput.isFocused();

if (!(isVisible || isFocused)) {
return;
}

if (this.textInput.id !== event.target.id) {
if (this.textInput !== event.target) {
return;
}

event.preventDefault();

const {files, types} = event.clipboardData;
const TEXT_HTML = 'text/html';

Expand Down

0 comments on commit eec472b

Please sign in to comment.