mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 02:24:47 +08:00
FIX: call composer reset with correct params (#21777)
We were calling reset without the proper params which was causing errors in the console. This commit does the following changes: - ensures `composer.cancel()` is the only way to cancel editing/reply - adds a `draftSaved` property to chat message to allow for better tests - writes a spec to ensure the flow is correct - adds more page objects for better tests - homogenize the default state of objects on chat message Co-authored-by: Martin Brennan <martin@discourse.org>
This commit is contained in:
@ -22,12 +22,11 @@
|
||||
(if this.pane.sending "is-sending")
|
||||
(if this.sendEnabled "is-send-enabled" "is-send-disabled")
|
||||
(if this.disabled "is-disabled" "is-enabled")
|
||||
(if this.currentMessage.draftSaved "is-draft-saved" "is-draft-unsaved")
|
||||
}}
|
||||
{{did-update this.didUpdateMessage this.currentMessage}}
|
||||
{{did-update this.didUpdateInReplyTo this.currentMessage.inReplyTo}}
|
||||
{{did-insert this.setup}}
|
||||
{{did-insert this.didUpdateChannel}}
|
||||
{{did-update this.didUpdateChannel @channel.id}}
|
||||
{{will-destroy this.teardown}}
|
||||
{{will-destroy this.cancelPersistDraft}}
|
||||
>
|
||||
|
Reference in New Issue
Block a user