Skip to content

Commit 91d2aab

Browse files
authored
Merge pull request #23525 from daordonez11/hotfix-allowpastinginemoji
[CP Staging] hotfix: avoid early prevent default to copy in normal inputs
2 parents 104e65a + b68d90c commit 91d2aab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Composer/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,19 @@ class Composer extends React.Component {
307307
* @param {ClipboardEvent} event
308308
*/
309309
handlePaste(event) {
310-
event.preventDefault();
311-
312310
const isVisible = this.props.checkComposerVisibility();
313311
const isFocused = this.textInput.isFocused();
314312

315313
if (!(isVisible || isFocused)) {
316314
return;
317315
}
318316

319-
if (this.textInput.id !== event.target.id) {
317+
if (this.textInput !== event.target) {
320318
return;
321319
}
322320

321+
event.preventDefault();
322+
323323
const {files, types} = event.clipboardData;
324324
const TEXT_HTML = 'text/html';
325325

0 commit comments

Comments
 (0)