mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Trim trailing whitespace when pasting plain text
Summary: title Test Plan: Tested manually. Blank rows at the end are no longer pasted. Pasting multiple columns separated by tabs can still have blank cells in some cells of the final rows. I don't think this needs an automated test. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3110
This commit is contained in:
parent
4a70283292
commit
dc2aee4be9
@ -154,7 +154,7 @@ Clipboard.prototype._onPaste = function(elem, event) {
|
||||
if (plainText === '' || plainText.charCodeAt(0) === 0xFEFF) {
|
||||
data = [['']];
|
||||
} else {
|
||||
data = tsvDecode(plainText.replace(/\r\n?/g, "\n"));
|
||||
data = tsvDecode(plainText.replace(/\r\n?/g, "\n").trimEnd());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user