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

Fix cumbersome pasting with Cmd + V #137

Merged
merged 1 commit into from Jun 19, 2016
Merged

Fix cumbersome pasting with Cmd + V #137

merged 1 commit into from Jun 19, 2016

Conversation

parisk
Copy link
Contributor

@parisk parisk commented Jun 19, 2016

For some reason, setting the element's contentEditable value to true within a keyboard event, while the element has focus, did not allow pasting with clipboard, unless the element gets clicked explicitly.

For some reason, setting the element's contentEditable value to true within a keyboard event, while the element has focus, did not allow pasting with clipboard, unless the element gets clicked explicitly.
@Tyriar
Copy link
Member

Tyriar commented Jun 19, 2016

This might be a browser security feature, ensuring that a user action is performed before accessing the clipboard.

@parisk
Copy link
Contributor Author

parisk commented Jun 19, 2016

I do not think so. The thing is that when you press Cmd + V on OS X Chrome (which is a user action), it does not fire the paste event. This happens only when the textarea's contenteditable value is being set to true from false and no click has happened before the keyboard event.

@parisk parisk merged commit 04a8137 into master Jun 19, 2016
@Tyriar Tyriar deleted the improve-paste branch October 31, 2016 19:01
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

Successfully merging this pull request may close these issues.

None yet

3 participants