Page MenuHomePhabricator

Issues with 2017 editor and Grammarly
Closed, ResolvedPublic

Description

I have the Chrome extension Grammarly. It highlights grammatical and typografical errors. However, when performing a change it suggests (it replaces the word in question with the accepted suggestion (over JavaScript?) the text changes on my screen, but when checking the changes made via the preview dialogue (or after save) all errors are still present, causing the page i see when trying to save, vs the actual text that gets saved are different. Will attach a video later. This is not an issue with a normal text field or the old wiki editor.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Deskana changed the task status from Open to Stalled.Jun 5 2017, 2:24 PM
Deskana subscribed.

Stalled pending more details.

Same thing happen in Grammarly. In this case I tested against Reinli Stave Church which has a text "…who is buried beneath the south-east entrance" in the fourth paragraph. The term "south-east" should be written "southeast".

Before correcting the term is

<g class="gr_ gr_38 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="38" data-gr-id="38">south-east</g>

afterwards it is just southeast, that is the enclosing tag is removed.

I guess this change happen without any of the tracked events, probably with a direct change of the dom. For a few years there has been available Mutation event types.

Josve05a renamed this task from Issues with 2017 editor and Gramaticly to Issues with 2017 editor and Grammarly.Jun 8 2017, 11:14 PM

MutationObserver is not yet supported in all of our target browsers, although these days it is just down to IE10 and some fairly old versions of FF/Chrome. For that reason we don't fully support browser plugins that modify the DOM.

We do however have a surface observer that polls the DOM node where the cursor currently is (to support the browser's built in spellchecker), so if you place your cursor before using the plugin the change should be observed.

CCing @dchan as DOM observation is his domain. There may also be IME issues with MutationObserver that make it undesirable.

Deskana moved this task from To Triage to TR1: Releases on the VisualEditor board.

The fix to T165746 will disable Grammarly, which prevents it from causing VE to crash.

Esanders claimed this task.

Grammarly should be disabled on VE surfaces (at least wikitext mode)