Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste (and copy) are broken on Safari #87

Open
vincentwoo opened this issue Sep 2, 2015 · 3 comments
Open

Paste (and copy) are broken on Safari #87

vincentwoo opened this issue Sep 2, 2015 · 3 comments

Comments

@vincentwoo
Copy link

Trying to copy/paste in safari using cmd + c / cmd + v on latest Safari and term.js (v0.0.7) doesn't work.

copy

The keypress handler swallows cmd + c, and doesn't let the browser do its thing.

paste

Paste events are tricky in Safari - you need some kind of input element or contenteditable target for the paste event to fire. Traditional workarounds include catching a keydown for cmd + v and quickly focusing an editable element and catching paste on that.

@vincentwoo
Copy link
Author

Upon further investigation I think the proper course of action is probably for term.js to always have a hidden input element. It seems like it already does this in a limited fashion for mobile browsers. A hidden text element will allow you to much more reliably capture paste events.

@VigibotDev
Copy link

Hello, can you test the firefox patch #51 ? it fix also for Chrome.
But CTRL+C don't work also in firefox (it deselect the text) but menubar copy work.

@yoshiokatsuneo
Copy link

@vincentwoo I made a Pull-Request that enable Copy and Paste using hidden text area. #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants