Navigation with minimized topic draft can trigger abandon dialog

I’ve only had it happen with the topic draft. I just tried it with a reply draft and couldn’t reproduce it.

I’m just starting to try to familiarize myself with Discourse code, so this may be a dumb suggestion, but I did some digging and there was a fix made a few years ago:

https://github.com/discourse/discourse/commit/359f03ca73f92bcc8bf25140ab96e2b9b8cc87f7#diff-63b31ab42d152f878f4fb06d7e6b4775

I saw this addition:

  // If there's a draft, open the create topic composer
  if (model.draft) {
    this.controllerFor('composer').open({
      action: Discourse.Composer.CREATE_TOPIC,
      draft: model.draft,
      draftKey: model.draft_key,
      draftSequence: model.draft_sequence
    });
  }

Would an action like that being called during navigation be what’s producing what appears to be the behavior you would expect if you clicked the “New Topic” button with a draft in place?

1개의 좋아요