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

Getting 2 rows of data when pasting to one row in Chrome. #3123

Closed
nicam opened this issue Jan 14, 2016 · 9 comments
Closed

Getting 2 rows of data when pasting to one row in Chrome. #3123

nicam opened this issue Jan 14, 2016 · 9 comments

Comments

@nicam
Copy link

nicam commented Jan 14, 2016

Hi There

There's an issue in Handsontable when it's used inside an Angular2 application.
When you copy a row and paste it into a different row on Chrome, 2 rows are inserted instead of one.

Gif Showing the Error

It only happens when Handsontable is running inside Angular2. I think this is somehow related to ZoneJS since this issue seems also be happening in MeteorJS when the ZoneJS Bundle is used there (awsp/handsontable-meteor#17).

You can reproduce it here: https://valor-software.github.io/ng2-handsontable/

Steps to reproduce:

  • Open example page in Chrome (47.0.2526.111)
  • Click on a single row
  • CMD+C (on Mac)
  • Click on a different row (has to be writable)
  • CMD+V

Two rows are inserted.

Any idea why ZoneJS might cause this issue on Chrome?

Best regards

Pascal Helfenstein

@nicam
Copy link
Author

nicam commented Jan 21, 2016

Any news on this?

@budnix
Copy link
Member

budnix commented Jan 21, 2016

Hi @nicam Handsontable for Angular2 (https://valor-software.github.io/ng2-handsontable/) is not supported by our team. It's an external library wrote by someone else.

But looking into code I saw that they using older version of Handsontable (0.18.0). This bug what you mentioned above I assume that no longer exists in the latest version. You can try to overwrite older version by executing bower install handsontable#0.21.0 but this solution can brake compatibility with ng2-handsontable.

@nicam
Copy link
Author

nicam commented Jan 21, 2016

Hi @budnix, the issue still persists with #0.21.0. I'm not using ng2-handsontable. I just posted the ng2-handsontable for you to be able to reproduce it.

I implemented handsontable into my Angular2 application myself. The issue seems to happen as soon as handsontable is running in an Angular2 Application.

@budnix
Copy link
Member

budnix commented Jan 21, 2016

Yes you are right. After upgrading (locally) demo to hot v0.21.0 I got the same issue. We need more time to investigate this case.

@nicam
Copy link
Author

nicam commented Jan 21, 2016

@budnix ok, thanks for your help :)

@poxrud
Copy link
Contributor

poxrud commented Feb 3, 2016

This is an issue with Zone.js in Angular2. I have sent a PR and am just waiting for it to be approved.
Another option is I can send a 1 line PR to Handsontable that will fix it.

@nicam
Copy link
Author

nicam commented Feb 4, 2016

Thanks for your help. @poxrud could you tell me what 1liner fixed it in handsontable so I can monkey patch it until ZoneJs is updated?

@poxrud
Copy link
Contributor

poxrud commented Feb 5, 2016

@nicam take a look at my PR #3195.

@nicam
Copy link
Author

nicam commented Feb 15, 2016

@poxrud Thank you very much!

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

No branches or pull requests

6 participants