Missing refresh of preview area with add-on


(Daniel Naber) #1

The preview area on the right gets automatically updated when typing in a new post. However, it does not get updated when the text gets modified by a browser add-on that directly changes the DOM. This is unfortunate, as it seems to be the preview area which gets actually posted.

The concrete use case I’m looking at is using the add-ons of my style and grammar checker (https://languagetool.org). It opens a popup and users can accept its suggestions, but due to the way Discourse behaves, the change will not end up in the preview until the user manually enters more text. Is this something that could be fixed?


(Rafael dos Santos Silva) #2

I don’t think that’s the case, what gets posted is the raw text at the left.


(Daniel Naber) #3

Just tried this several times: when clicking the submit button, the edit gets copied to the preview, so that’s okay anyway. But there’s still a case when this doesn’t work: when the add-on’s popup is still open, the edit does not get copied to the preview area for some reason (tested in Firefox). Maybe because the focus is in the add-on’s popup. I could make it post a text that was corrected only in the editor, not in the preview. The post that appeared was the uncorrected one from the preview. It wasn’t a new post, but an edit of an existing post.