Browser translate actually changing the document


We had a user that decided to click on “Translate to Portuguese” in a page with a ProseMirror editor. That made the whole document to be translated. The translator changes the DOM and that makes ProseMirror capture the change and send the steps to the Central Authority, which is not what the user wanted.

I was just wondering if anybody has also faced this problem and if there is a solution for that? Given that the DOM is changed I think it would be tricky to stop ProseMirror from reacting to that?


We had similar problems with Grammarly and added an attribute (data-gramm in this case) to the browser dom to turn it off. Maybe you can do sth similar for automatic translation.