Normally, when you refresh (F5) the browser window after having edited a post, it simply reloads the current thread. If you refresh a rated thread after having edited a post, the edit is shown again (I then cancel the edit, and everything is fine again.)
Yes this is a tricky one. I’ve been trying to pin it down this morning. This is what I’ve discovered so far:
-
It only occurs if you only change the rating on a reply by editing it. If you change the rating on the first post in a topic or change a rating in a reply and also change the content of the post, it does not occur.
-
The composer opening is triggered by this method in the topic-from-params route:
if (!Ember.isEmpty(topic.get('draft'))) {
composerController.open({
draft: Draft.getLocal(topic.get('draft_key'), topic.get('draft')),
draftKey: topic.get('draft_key'),
draftSequence: topic.get('draft_sequence'),
topic: topic,
ignoreIfChanged: true
});
}
```
So in other words, if only the rating is changed and the title and reply remain the same when an edit to a reply is saved, the ``draft`` attribute of the topic view is populated on the server.
However, it turns out that this is true generally of Discourse. If you edit a reply, do not change the title or reply content and then 'save' the edit, the composer will re-open if you refresh the page: http://quick.as/m1vrS6JxV
Is this a bug or is it intentional? @riking @zogstrip @sam