This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Osama Sayegh 586d572e05
FIX: Don't advance draft sequence when editing topic title (#16002)
This commit handles the edge case where a draft is lost with no warnings if the user edits the title (or category/tags) of a topic while they're replying.to the same topic. Repro steps are as follows:

1. Start replying to a topic and type enough to get a draft saved.
2. Scroll up to the topic title and click the pencil icon next to the topic title, change the title, category and/or tags, and then save the changes.
3. Reload the page and you'll see that the draft is gone.

This happens because we only allow 1 draft per topic per user and when you edit the title of a topic that you're replying to, from the server perspective it'll look like as if you've submitted your reply so it will advance the draft sequence for the topic and delete the draft.

The fix in this commit makes `PostRevisor` skip advancing the draft sequence when a topic's title is edited using the pencil button next to the title.

Internal ticket: t60854.

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2022-02-23 10:39:54 +03:00
..
app FIX: Don't advance draft sequence when editing topic title (#16002) 2022-02-23 10:39:54 +03:00
config DEV: Allow ember server --environment production to be used (#15431) 2021-12-31 12:26:23 +00:00
lib DEV: Improve Ember module shims under Ember CLI (#15795) (#15806) 2022-02-03 17:36:32 +00:00
public/assets/scripts DEV: Allow access to ember-computed-decorators under ember-cli (#15945) 2022-02-16 11:16:28 +00:00
tests FIX: Respect text direction inside quotes (#16004) 2022-02-23 10:26:45 +03:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Improve test paths pattern for Ember CLI. 2022-02-07 09:22:15 +08:00
package.json DEV: Enable the use of Glimmer components (#15999) 2022-02-21 09:44:48 +00:00
testem.js DEV: Update plugin JS loading in Ember CLI testem environment 2022-01-18 10:16:29 +00:00