The copy / paste function works correctly in Chrome and works poorly in Safari. I work on Mac OS (Maverick). The code uses Handsontable 0.11.4 and the ZeroClipboard plugin.
Operations that work in both browsers:
Operations that work in Chrome but not in Safari
- Copy / paste between grid cells whenever Cmd-P is used. That is, in Safari (unlike Chrome), you cannot paste the selection copied from the grid back into some area of the grid using the Cmd-P keyboard shortcut.
- Copy from another program (e.g. Excel or Sublime) to the grid. It works great in Chrome (using the Cmd-P or Paste menu option) and generally doesn't work in Safari. You cannot copy from an external program to Handsontable when working in Safari.
, , , "" Chrome. - , - . , , , ( 6938)
CopyPasteClass.prototype.triggerPaste = function (event, str) {
var that = this;
if (that.pasteCallbacks) {
setTimeout(function () {
var val = (str || that.elTextarea.value).replace(/\n$/, '');
for (var i = 0, ilen = that.pasteCallbacks.length; i < ilen; i++) {
that.pasteCallbacks[i](val, event);
}
}, 50);
}
};
that.elTextarea.value Chrome, Cmd-P Safari. , Chrome, Excel Safari, .
, Safari, . , ( ) (Chrome Firefox Windows) , Safari Mac. , Excel Handsontable. Ctrl-P, . .
?