fix(editor): make Ctrl/Cmd+S save from inside the embedded editor - #126
Merged
Merged
Conversation
The injected bridge swallows the shortcut and posts REQUEST_SAVE to the parent, but nothing in the view page listened, so the keystroke was a no-op. EditorEmbed now re-emits it as save-requested and ElpxViewPage runs the same save as the button, guarded by writability and an in-flight save.
Contributor
Preview this PR in the Nextcloud PlaygroundA fresh Nextcloud boots in your browser with this branch's eXeLearning editor: |
erseco
added this pull request to stack #130
September 26, 2026 06:14
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/viewer-lifecycle #126 +/- ##
=======================================================
Coverage 93.79% 93.79%
Complexity 152 152
=======================================================
Files 22 22
Lines 661 661
Branches 54 54
=======================================================
Hits 620 620
Misses 34 34
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 3/5, based on #125.
What
The bridge injected by
EditorHtmlServiceswallows Ctrl/Cmd+S and postsREQUEST_SAVEto the parent, but nothing in the view page listened, so the shortcut did nothing.EditorEmbednow re-emits it assave-requested, andElpxViewPageruns the samesave()as the button, guarded bycanShowSaveButtonand an in-flight save.No component test: Vitest has no Vue plugin configured. The wiring is two lines, and PR 5 covers the
EditorFrame.onMessagepath it relies on.Verification