Skip to content

Conversation

@hiro-su
Copy link
Contributor

@hiro-su hiro-su commented Nov 1, 2016

hello, i always use this project.
can't get data ev.clipboardData in IE11.
this pr will fix it, so please check.

if (ev.clipboardData) {
var text = ev.clipboardData.getData('text/plain');

var paste = function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please add a text argument to the function.
  2. I would prefer it if the function was renamed to something more semantic like dispatchPaste

if (userAgent.match(/msie|MSIE/) || userAgent.match(/(T|t)rident/)) {
if (window.clipboardData) {
var text = window.clipboardData.getData('Text');
paste();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call this as paste(text).

} else {
if (ev.clipboardData) {
var text = ev.clipboardData.getData('text/plain');
paste();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call this as paste(text).

@parisk parisk added this to the 2.1.0 milestone Nov 1, 2016
@parisk
Copy link
Contributor

parisk commented Nov 1, 2016

Thanks for this @hiro-su! Just a few code comments to be fixed and I think it's good to go.

@hiro-su hiro-su force-pushed the fix-ie11-paste-key branch from 20e7b92 to 77ca154 Compare November 2, 2016 02:18
@hiro-su
Copy link
Contributor Author

hiro-su commented Nov 2, 2016

@parisk Thank you for review. I made some changes to pr. Can you be able to check them?

@parisk
Copy link
Contributor

parisk commented Nov 2, 2016

Great @hiro-su, thanks!

@parisk parisk merged commit 70965a8 into xtermjs:master Nov 2, 2016
@hiro-su hiro-su mentioned this pull request Nov 4, 2016
@hiro-su hiro-su deleted the fix-ie11-paste-key branch November 6, 2016 11:02
@parisk
Copy link
Contributor

parisk commented Nov 11, 2016

@hiro-su just letting you know that we mentioned you for this contribution (along with #339 and #345), in the 2.1 announcement. Thank you!

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.

2 participants