discourse/plugins/discourse-presence/test/javascripts/acceptance
David Battersby aaa63c4f6c
FIX: load saved draft when clicking reply to post (#33543)
In the past we have always relied on automatically opening the composer
and auto loading the existing draft when visiting a topic that has a
draft post reply. This is fine to auto load the draft, but when the
composer is closed and reopened on the same page then we have an issue.

The result is that the draft is then deleted because the draft key is
set and the composer body is blank, since it has never been populated
when clicking the reply to post button.

To solve this we can check for existing drafts when clicking the reply
to post button, then load the draft into the composer.

_The challenging part of this change is that we have a number of tests
that were relying on a false positive. Hence in the specs I have
switched some tests to use a fixture that does not have drafts and in
some cases kept the same fixture but mocked the response as having no
drafts returned._
2025-07-15 13:32:31 +04:00
..
discourse-presence-test.js FIX: load saved draft when clicking reply to post (#33543) 2025-07-15 13:32:31 +04:00