committed by
Nicolás Hatcher Andrés
parent
5d7f4a31d6
commit
3a68145848
@@ -167,7 +167,7 @@ fn copy_paste_internal() {
|
||||
let copy = model.copy_to_clipboard().unwrap();
|
||||
assert_eq!(
|
||||
copy.csv,
|
||||
"42\t127\n\"A season of faith\t \"\"perfection\"\"\"\t\n"
|
||||
"42\t127\n\"A season of faith\t \"\"perfection\"\"\""
|
||||
);
|
||||
assert_eq!(copy.range, (1, 1, 2, 2));
|
||||
|
||||
|
||||
@@ -1641,7 +1641,7 @@ impl UserModel {
|
||||
.map_err(|e| format!("Error converting from utf8: '{e}'"))?;
|
||||
|
||||
Ok(Clipboard {
|
||||
csv,
|
||||
csv: csv.trim().to_string(),
|
||||
data,
|
||||
sheet,
|
||||
range: (row_start, column_start, row_end, column_end),
|
||||
|
||||
@@ -473,7 +473,7 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
|
||||
sheet,
|
||||
clipboardId,
|
||||
});
|
||||
event.clipboardData.setData("text/plain", data.csv);
|
||||
event.clipboardData.setData("text/plain", data.csv.trim());
|
||||
event.clipboardData.setData("application/json", clipboardJsonStr);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user