Skip to content

Pasting more than 2 rows inserts blank rows #2137

@pcadec

Description

@pcadec

Describe the bug

Dear Ghislain,

When pasting 3 or more rows, then blank rows are inserted every other row.
Errors occurs when data is copied from Excel, but also when copied from Slickgrid itself.

I fixed it locally in the file /packages/common/src/extensions/slickCellExternalCopyManager.ts

Inside decodeTabularData(grid, clipText)
I replaced
const clipRows = clipText.replace('\r\n', '\n').split(/\n\f\r/);
By
const clipRows = clipText.replaceAll('\r\n', '\n').split(/\n\f\r/);

Thanks for your consideration on the topic

Reproduction

Bug occured with Chrome version 139.0.7258.155 but NOT in Firefox 142.0.1

It can be reproducted directly on this demo page :
https://ghiscoding.github.io/angular-slickgrid-demos/#/example03

When reproducing on the demo page, just click "ok" to all "This is a required field". These alert are thrown because of blank lines inserted, which can be seen when all the alerts are closed.

Which Framework are you using?

Angular

Environment Info

| Executable          | Version |
| ------------------- | ------- |
| (framework used)    | ANGULAR |
| Slickgrid-Universal | 9.8.0   |
| TypeScript          | 5.5.4   |
| Browser(s)          | CHROME 139|
| System OS           | WINDOWS 11 |

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions