Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handsontable paste not working

I've implemented handsontable in MVC .Net 4 using razer views, and although the paste functionality works beautifully on localhost (both in release and debug mode), it fails once deployed.

It fails silently (no console output) but if you double click to edit a specific cell, you can paste all the data into that cell, but it doesn't work when trying to paste a table from excel into handsontable. I've tried debugging the actual handsontable code but have found almost nothing to help out, only that it looks like the hidden textarea (class copyPaste) is not set to active when ctrl key is pressed, but I could be completely misguided about this ascertion. I don't know if this is maybe an IIS setting (I doubt it, javascript is client side) or something completely unrelated, but any help would be much appreciated. I feel like I'm going a little crazy with this one.

like image 470
audiochick Avatar asked Feb 18 '14 13:02

audiochick


1 Answers

I found the problem, which is deceptively simple.

In the jquery.handsontable.full.js on line 6279:

that.selectNodeText(that.elTextarea);

That line was commented out, I just uncommented it, and everything worked beautifully again.

I hope this helps someone one day if they run into the same sort of issue. Happy coding!

like image 90
audiochick Avatar answered Sep 28 '22 06:09

audiochick