Page MenuHomePhabricator

Recursive Reply tool boxes when switching out of source-mode Reply tool halfway through an edit
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue, then What happens?

  • Make sure the "reply" tool has your default editing mode set as "Source", not "Visual" (top right of pop-up reply box)
  • Go to a talk page (user or article talk)
  • Click on the "New section" tab or the "Start a discussion" button (not the "[ reply ]" link after a comment sig).

The reply tool box will pop up, saying "A new way to start topics is here"

  • Add any text to the body field
  • Change your mind about using the reply tool; click the "Edit" or "Create" tab to switch to the traditional source editing of the entire page.
  • Confirm that you want to leave the page, in order to dismiss the popup.

The traditional editing fields will appear with, oddly, the reply tool box below them.

  • Click the "Preview" button below the trad editing text-entry box.

Reply-tool editing boxes will load recursively, one inside another, with each new inner nested box placed between the live preview and the summary field of the previous (outer, enclosing) reply-tool editing box. Each reply-tool editing box will also produce a popup saying "Changes recovered [linebreak] Your unsaved changes have been automatically recovered"

  • (Hit page-reload on your browser to stop the recursion)

Variant:
If you have Visual mode set in the reply tool, it fails in a similar but non-recursive way, flanking the traditional editing fields with two reply-tool boxes (one above, one below).

What should have happened instead?:
I should be able to switch out of the reply-tool mode into the traditional tool mode at any point, because there are some things you can't do with the reply tool.

Other information:
Debian's Firefox LTS, currently 91.13.0esr

Event Timeline

HLHJ updated the task description. (Show Details)
HLHJ updated the task description. (Show Details)
HLHJ updated the task description. (Show Details)
HLHJ updated the task description. (Show Details)

I can reproduce. You need to have "Show preview without reloading the page" enabled in preferences. This is terrible and hilarious.

Thanks, Matamrex! I can confirm that if I disable the "Show preview without reloading the page" setting at https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-editing-discussion, the recursive step of the bug does not appear. You still get both editors open simultaneously, tho (the part I described as "oddly" in the OP). I'm fairly sure that setting is enabled by default.

Ticking the "Automatically enable most beta features" setting also removes the recursion, but not the both-editors-open part of the bug.

HLHJ updated the task description. (Show Details)

It seems as though the main problem may be that if you have any text in the reply tool, it will never drop it, even if you reload the page. It really wants to recover your unsaved changes.

But if you switch editors, it can't integrate your new text into the trad editor, so it keeps itself around so you can copy-paste the text manually, the "oddly" behaviour. That might be a feature. If you do copy-paste it, leaving the reply-tool box completely empty, the recursive behaviour does not appear when you hit the preview button, but neither does the preview.

Change 841194 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Fix new topic tool appearing from autosave in its own preview

https://gerrit.wikimedia.org/r/841194

Change 841195 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Fix new topic tool appearing from autosave in edit mode

https://gerrit.wikimedia.org/r/841195

Change 841194 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Fix new topic tool appearing from autosave in its own preview

https://gerrit.wikimedia.org/r/841194

Change 841195 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Fix new topic tool appearing from autosave in edit mode

https://gerrit.wikimedia.org/r/841195

EAkinloose subscribed.

Before fix:

Screenshot 2022-10-26 at 23.54.07.png (2×3 px, 282 KB)

After fix, I am able to switch out of the reply-tool mode into the traditional tool mode at any point. See preview

Screenshot 2022-10-26 at 23.57.08.png (1×2 px, 380 KB)

Tacsipacsi renamed this task from Recursive Reply-tool boxes, when switching out of Markdown-mode Reply tool partway through an edit to Recursive Reply tool boxes when switching out of source-mode Reply tool halfway through an edit.Oct 27 2022, 12:26 AM