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

Re-enable right click paste/cut #13

Open
adam-knights opened this issue Aug 23, 2016 · 0 comments
Open

Re-enable right click paste/cut #13

adam-knights opened this issue Aug 23, 2016 · 0 comments

Comments

@adam-knights
Copy link

The right click menu has been disabled on the component. This can be removed once we get cut and paste via the right click menu working.

I tried http://stackoverflow.com/a/38898022/2482265 but this did not work.

I also tried manually with JQuery inside didInsertElement, with code similar to

if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.types
                && $.inArray('text/plain', e.originalEvent.clipboardData.types) !== -1) {
  dateString = e.originalEvent.clipboardData.getData('text/plain');
}
else if (window.clipboardData) {
  dateString = window.clipboardData.getData('Text');
}
else {
  return;
}

But this has issues if they paste part of the date. The other way is to use a sertTimeout of 100ms and give Ember time to update the value. But that feels too hacky.

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

1 participant