Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 10, 2023
Merged

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Jul 7, 2023

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- force-pushed the fix/paste_formatting branch from 09db13b to 32a9593 Compare July 7, 2023 01:31
@cypress
Copy link

cypress bot commented Jul 7, 2023

1 flaky tests on run #10912 ↗︎

0 146 1 0 Flakiness 1

Details:

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

View Output Video

Test Artifacts
test link marks > autolink > without protocol Output Screenshots

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
Member Author

mejo- commented Jul 10, 2023

/compile

@mejo-
Copy link
Member Author

mejo- commented Jul 10, 2023

/backport 02f8f91 to stable27

@mejo-
Copy link
Member Author

mejo- commented Jul 10, 2023

/backport 02f8f91 to stable26

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy and paste removes newline
4 participants