In a support thread titled ‘Post entry: Entered text deleted on enter,’ Arnd reports a bug in Discourse v2.3.0.beta2 where text after a mention (e.g., ‘@example: The quick brown fox’) disappears upon pressing Enter. codinghorror suggests it may be an edge case involving colons or spaces, recommending pressing Enter after completing the mention. Arnd tests multiple scenarios, finding that text deletion occurs only when a single alphanumeric word follows the mention and Enter is pressed — unless a backspace precedes Enter. zogstrip flags it as a serious issue and asks maja to investigate, warning of complexity. codinghorror believes it was previously fixed by dan and sam. zogstrip agrees to close if unreproducible. In a follow-up, Arnd confirms most cases are fixed in v2.3.0.beta3 +16, except ‘@example Something’ + Enter still deletes trailing text — but only if it’s a single word with no punctuation. zogstrip closes the issue, unable to reproduce, inviting Arnd to flag for reopening if needed.
When creating a post and starting a new line with a mention immediately followed by a colon all text entered after the mention will get deleted when pressing the enter key.
@example: + enter
User completion pop up closes after pressing : and : disappears after enter
@example Something + enter
User completion pop up closes after pressing space and all text after username disappears after enter
@example: Something + enter
User completion pop up closes after pressing : and all text after username disappears after enter
@example: Something + backspace + enter
User completion pop up closes after pressing : but all text remains after pressing enter
If the last character before enter is a backspace the text is not deleted
I became aware of this problem as a user encountered this and was wondering why his entered text disappeared when pressing enter…
I did a retest and all but one case now work fine. The only case still behaving strange is:
@example Something + enter
User completion pop up closes after pressing space and all text after username disappears after enter
This only happens if a single word is entered containing only characters. It does not happen if multiple words are added (separated by space) or if there are non alpha characters (like ,, ? or ← ).