mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

$focusSink as textarea #1000

Open rb-cohen opened 10 years ago

rb-cohen commented 10 years ago

Any objections to switching the $focusSink element from a div to a textarea?

I've been trying to get paste working with Safari 6/7, and it doesn't like elements that aren't contentEditable for pasting.

Looking at how google drive does it, they use a hidden textarea in the same way slickgrid uses a div. In some preliminary tests everything appears to work well if I change change the tag from div to textarea.

With $focusSink as a textarea I can accept pasted data from a Ctrl+V or Edit > Paste in Safari/FF/Chrome (and probably IE) with some modifications to @Celebio's copy/paste plugin.

If there are no objections I'd be happy to submit a pull request.

Celebio commented 10 years ago

That would be great, a lot of people are asking for the support of Safari.

6pac commented 9 years ago

I'm looking at things like this at the moment, would you like to submit a pull request ?

icoxfog417 commented 9 years ago

Did you see Pull #435 or Pull #936? These pull requests relate to copy/paste problem.