Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Paste using inserttext. Fixes #1015.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 28, 2017
1 parent 56635d0 commit 0ff4739
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/views/1_ApplicationComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,16 @@ export class ApplicationComponent extends React.Component<{}, ApplicationState>

if (jobFormComponent) {
jobFormComponent.focus();
event.preventDefault();
jobFormComponent.appendText(event.clipboardData.getData("text/plain"));
return;
document.execCommand("inserttext", false, event.clipboardData.getData("text/plain"));
}

if (currentJob) {
currentJob.write(event.clipboardData.getData("text/plain"));

event.stopPropagation();
event.preventDefault();
}

event.stopPropagation();
event.preventDefault();

return;
}

Expand Down

0 comments on commit 0ff4739

Please sign in to comment.