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

Hotfix/ie paste #162

Merged
merged 4 commits into from
Sep 14, 2019
Merged

Hotfix/ie paste #162

merged 4 commits into from
Sep 14, 2019

Conversation

bsbimalbose
Copy link
Contributor

This fixes the multi-cell paste issue in IE

src/DataSheet.js Outdated
// Listen for Ctrl + V in case of IE
if (isIE) {
var thisContext = this
document.addEventListener('keydown', function (e){
Copy link
Owner

Choose a reason for hiding this comment

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

you can use lamda function here not to have an extra var here for passing context. Or bind the function

src/DataSheet.js Outdated
// Listen for Ctrl + V in case of IE
if (isIE) {
var thisContext = this
document.addEventListener('keydown', function (e){
Copy link
Owner

Choose a reason for hiding this comment

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

On component will unmount, remove the event listener as well

Copy link
Owner

@nadbm nadbm left a comment

Choose a reason for hiding this comment

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

Thank you for the pr @bsbimalbose , if you can fix the comments, will go ahead and merge this pr

@bsbimalbose
Copy link
Contributor Author

bsbimalbose commented Aug 20, 2019

@nadbm I've updated the code. Please merge this PR

@nadbm nadbm merged commit 8ddd3ee into nadbm:master Sep 14, 2019
@tmreay tmreay mentioned this pull request Mar 24, 2020
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.

3 participants