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
  • Loading branch information
mountiny committed Jul 25, 2023
2 parents 104e65a + b68d90c commit 91d2aab
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 91d2aab

Please sign in to comment.