Inconsistent micro-edit button behavior

AI-generated summary

The discussion revolves around inconsistent behavior of the micro-edit button in Discourse, where selecting text sometimes opens the mini editor and other times the full editor. rahim123 reports this unpredictability, especially when selecting single or multiple words. supermathie explains that the mini editor is used only when the selected text can be unambiguously identified; otherwise, the full editor is opened. renato adds that the logic is defined in the code, and the full editor is triggered if duplicates are complex or if tables, line breaks, or non-ASCII characters are involved.

I honestly can't figure out any rhyme or reason for how the micro Edit button works (the one where you select text in your published post and an Edit button pops up). Sometimes selecting a single whole word opens the popup micro editor, and sometimes it opens the complete post editor. Same goes for selecting multiple words or multiple partial words. Any suggestions or explanations? Thanks!

Edits: In the sentence I honestly can’t figure out any rhyme or reason for how the micro Edit button works I selected each word individually and hit the popup Edit button and put the word in monospaced text when it took me to the full editor.

The answer I got when I asked this internally was:

If Discourse can determine from the selected text without ambiguity exactly which text in the post is being edited, it’ll use the mini editor. Else it’ll use the full editor.

This is where this is currently defined:

I believe that in your test you hit the “duplicates are too complex” condition, like Michael said. It also uses the full editor if tables, line breaks or non-ascii characters are involved.