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.

You probably want to stop the translation itself. see especially the tip part. No browser actually implemented it yet but the tip points out how to stop translation (at least by google translate page).