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();
|
let copy = model.copy_to_clipboard().unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
copy.csv,
|
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));
|
assert_eq!(copy.range, (1, 1, 2, 2));
|
||||||
|
|
||||||
|
|||||||
@@ -1641,7 +1641,7 @@ impl UserModel {
|
|||||||
.map_err(|e| format!("Error converting from utf8: '{e}'"))?;
|
.map_err(|e| format!("Error converting from utf8: '{e}'"))?;
|
||||||
|
|
||||||
Ok(Clipboard {
|
Ok(Clipboard {
|
||||||
csv,
|
csv: csv.trim().to_string(),
|
||||||
data,
|
data,
|
||||||
sheet,
|
sheet,
|
||||||
range: (row_start, column_start, row_end, column_end),
|
range: (row_start, column_start, row_end, column_end),
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
|
|||||||
sheet,
|
sheet,
|
||||||
clipboardId,
|
clipboardId,
|
||||||
});
|
});
|
||||||
event.clipboardData.setData("text/plain", data.csv);
|
event.clipboardData.setData("text/plain", data.csv.trim());
|
||||||
event.clipboardData.setData("application/json", clipboardJsonStr);
|
event.clipboardData.setData("application/json", clipboardJsonStr);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|||||||
Reference in New Issue
Block a user