Skip to content

fix(NcRichContenteditable): restore native undo/redo events#8286

Merged
Antreesy merged 2 commits into
mainfrom
fix/4101/rich-contenteditable-plaintext-only
Mar 11, 2026
Merged

fix(NcRichContenteditable): restore native undo/redo events#8286
Antreesy merged 2 commits into
mainfrom
fix/4101/rich-contenteditable-plaintext-only

Conversation

@Antreesy

@Antreesy Antreesy commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

☑️ Resolves

🖼️ Screenshots

🏚️ Before

2026-03-09_22h02_42.mp4

🏡 After

2026-03-09_22h00_54.mp4

🚧 Tasks

  • Test tribute mentions pasting (still messing with history operations)
  • Test file pasting (event fired, but no content changed in the component)
  • Test in app (Talk)
  • Chromium
  • Firefox (135 with fallback)
  • Webkit

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@Antreesy Antreesy added this to the 9.6.0 milestone Mar 9, 2026
@Antreesy Antreesy self-assigned this Mar 9, 2026
@Antreesy Antreesy added bug Something isn't working 3. to review Waiting for reviews feature: rich-contenteditable Related to the rich-contenteditable components labels Mar 9, 2026
@Antreesy Antreesy force-pushed the fix/4101/rich-contenteditable-plaintext-only branch from a78deab to 4431475 Compare March 9, 2026 21:05
@codecov

codecov Bot commented Mar 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.65%. Comparing base (060eeee) to head (4b037c0).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ts/NcRichContenteditable/NcRichContenteditable.vue 42.85% 15 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8286      +/-   ##
==========================================
- Coverage   52.75%   52.65%   -0.10%     
==========================================
  Files         103      103              
  Lines        3361     3373      +12     
  Branches      980      984       +4     
==========================================
+ Hits         1773     1776       +3     
- Misses       1337     1345       +8     
- Partials      251      252       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Antreesy Antreesy force-pushed the fix/4101/rich-contenteditable-plaintext-only branch 2 times, most recently from fe119ee to 04208d7 Compare March 9, 2026 22:43
@Antreesy

This comment was marked as resolved.

@ShGKme ShGKme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.

Comment thread src/components/NcRichContenteditable/NcRichContenteditable.vue Outdated
Comment thread src/components/NcRichContenteditable/NcRichContenteditable.vue Outdated
@ShGKme

This comment was marked as resolved.

@DorraJaouad DorraJaouad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested

Comment thread src/components/NcRichContenteditable/NcRichContenteditable.vue Outdated
Comment thread src/components/NcRichContenteditable/NcRichContenteditable.vue
- Setting `contenteditable` to `plaintext-only` allows to avoid custom paste handling logic instead of manually inserted text nodes, which prevented the browser from tracking history for undo/redo operations
- Fallback kept for Firefox 135 and older to ensure component isn't broken when setting unknown attribute value

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the fix/4101/rich-contenteditable-plaintext-only branch from 55b85ce to 4b037c0 Compare March 11, 2026 16:17
@Antreesy

Copy link
Copy Markdown
Contributor Author

/backport to stable8

@Antreesy Antreesy merged commit f6a457c into main Mar 11, 2026
25 of 27 checks passed
@Antreesy Antreesy deleted the fix/4101/rich-contenteditable-plaintext-only branch March 11, 2026 16:27
@backportbot

This comment was marked as resolved.

@ShGKme

ShGKme commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

@Antreesy Backport?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CTLR+z removes manual input after CTLR-v

4 participants