From cd09095309eb1c1e9788c9b685a84e050d820550 Mon Sep 17 00:00:00 2001 From: David Battersby Date: Fri, 9 May 2025 15:36:28 +0400 Subject: [PATCH 1/8] FIX: resolve discard draft keep editing --- .../app/components/modal/discard-draft.gjs | 8 ++++- .../discourse/app/services/composer.js | 1 + spec/system/composer/discard_draft_spec.rb | 30 +++++++++++++++++++ .../page_objects/components/composer.rb | 5 ++++ .../page_objects/modals/discard_draft.rb | 4 +++ 5 files changed, 47 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/modal/discard-draft.gjs b/app/assets/javascripts/discourse/app/components/modal/discard-draft.gjs index 10acf7e6d958a..5e8da22f08733 100644 --- a/app/assets/javascripts/discourse/app/components/modal/discard-draft.gjs +++ b/app/assets/javascripts/discourse/app/components/modal/discard-draft.gjs @@ -17,6 +17,12 @@ export default class DiscardDraftModal extends Component { this.args.closeModal(); } + @action + async keepEditing() { + this.args.model.onKeepEditing(); + this.args.closeModal(); + } +