Skip to content

fix(frontend): Improve paste handler for table cells - #4452

Merged
mejo- merged 2 commits into
mainfrom
fix/paste_formatting
Jul 10, 2023
Merged

fix(frontend): Improve paste handler for table cells#4452
mejo- merged 2 commits into
mainfrom
fix/paste_formatting

Conversation

@mejo-

@mejo-mejo- commented Jul 7, 2023

Copy link
Copy Markdown
Member

This replaces the broken approach from #3906.

  • Only regard paste handler if pasting to a table cell (Fixes: Copy and paste removes newline #4443)
  • Add all (marked) text nodes with newlines in between
  • Only add a newline for non-text nodes to prevent newlines in between text with changing marks.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation is not required

@mejo-mejo- added bug Something isn't working 3. to review labels Jul 7, 2023
@mejo-mejo- added this to the Nextcloud 26.0.4 milestone Jul 7, 2023
@mejo-mejo- mentioned this pull request Jul 7, 2023
@mejo-
mejo-force-pushed the fix/paste_formatting branch from 09db13b to 32a9593CompareJuly 7, 2023 01:31
@cypress

cypressBot commented Jul 7, 2023

Copy link
Copy Markdown

1 flaky tests on run #10912 ↗︎

014610Flakiness1

Details:

fix(frontend): Improve paste handler for table cells
Project: TextCommit:9c72f136ec
Status: PassedDuration: 06:22 💡
Started: Jul 10, 2023 8:17 AMEnded: Jul 10, 2023 8:23 AM
Flakiness cypress/e2e/nodes/Links.spec.js • 1 flaky test

ViewOutputVideo

Test Artifacts
test link marks > autolink > without protocol OutputScreenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

This replaces the broken approach from #3906.
* Only regard paste handler if pasting to a table cell (Fixes: #4443)
* Add all (marked) text nodes with newlines in between
* Only add a newline for non-text nodes to prevent newlines in between
text with changing marks.
Signed-off-by: Jonas <jonas@freesources.org>
@mejo-

Copy link
Copy Markdown
MemberAuthor

/compile

@mejo-

Copy link
Copy Markdown
MemberAuthor

/backport 02f8f91 to stable27

@mejo-

Copy link
Copy Markdown
MemberAuthor

/backport 02f8f91 to stable26

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releasebugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy and paste removes newline

4 participants

@mejo-@juliusknorr@luka-nextcloud@nextcloud-command