Page MenuHomePhabricator

Grammarly and VisualEditor
Open, LowPublic1 Estimated Story Points

Description

I was trying to edit the table on this page:
https://www.mediawiki.org/wiki/Wikimedia_Hackathon_2017/Mentoring_Program?veaction=edit&section=10

and seeing bunch of error and issues with it.

  1. Cannot tab into the next cell. The cursor is not even appearing there.
  2. Pressing enter to add line break inside a cell is throwing the following error

Uncaught TypeError: Cannot read property 'prototype' of undefined
Uncaught TypeError: Cannot read property 'model' of undefined

  1. Also the context menu is appearing way below the table.

Screen Shot 2017-05-19 at 2.36.16 PM.png (731×1 px, 262 KB)

Event Timeline

I can't make this happen. Did you do anything interesting to the table first?

Not sure actually, I was able to edit the table after I reloaded VE. Don't have the exact steps for now, unfortunately.

Framawiki renamed this task from Cannot edit a table on mediawiki to Cannot edit a table on mediawiki.org.May 19 2017, 5:23 PM
Framawiki subscribed.
Deskana changed the task status from Open to Stalled.May 31 2017, 11:44 AM
Deskana triaged this task as High priority.
Deskana moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Deskana subscribed.

I can't reproduce this either. Possibly a transient issue?

I face this issue only when I have Grammarly extension enabled :)

Esanders renamed this task from Cannot edit a table on mediawiki.org to Grammarly extension causes VE to crash.Jul 31 2017, 5:53 PM
Esanders lowered the priority of this task from High to Low.

Looks like grammarly is inserting <g> tags into the surface to annotate grammar mistakes.

See also https://github.com/ckeditor/ckeditor5/issues/267

Change 368822 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Disable Grammarly

https://gerrit.wikimedia.org/r/368822

The above patch fixes one known source of rogue tags, but we should probably do something other than crash fatally when encountering them.

Esanders renamed this task from Grammarly extension causes VE to crash to Grammarly and VisualEditor.Jul 31 2017, 6:12 PM

Change 368822 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Disable Grammarly

https://gerrit.wikimedia.org/r/368822

Change 368825 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Don't throw an exception if observed annotation is alien to us

https://gerrit.wikimedia.org/r/368825

Change 368825 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Don't throw an exception if observed annotation is alien to us

https://gerrit.wikimedia.org/r/368825

Deskana assigned this task to Esanders.
Deskana set the point value for this task to 1.

The specific problem has been solved by disabling Grammarly. The general problem has been solved by not crashing when encountering alien annotations. I guess we're done here!

Change 368830 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (4d6745b2f)

https://gerrit.wikimedia.org/r/368830

Change 368830 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (4d6745b2f)

https://gerrit.wikimedia.org/r/368830

Was this reported to Grammarly? They were very responsive at fixing their bugs in their interaction with CX, such as T124152.

While trying to verify this, I see that for other pages with tables, Grammarly stays disabled when editing table cells and therefore everything works fine. But today while testing on production, I noticed it getting enabled when I edit the fourth column of that specific table mentioned in the bug report on this page: https://www.mediawiki.org/wiki/Wikimedia_Hackathon_2017/Mentoring_Program?veaction=edit&section=10

The following issue occurs when I edit that table:

Steps:

  1. Insert a new row
  2. Add text to the first, second and third column of that row and observe that Grammarly does not get enabled
  3. However, as soon as you add something in the fourth column Grammarly gets enabled
  4. Add something to the fifth cell.
  5. Go back to the fourth cell and add a line break

Observe that, The content in the fifth cell moves to the sixth cell.

I have tried to re-create the scenario on this page: https://www.mediawiki.org/wiki/User:RYasmeen_(WMF)/Sandbox

And looks like Grammarly gets enabled again for the entire column of a table, if there is one cell in that column that has a multiline paragraph.

@Amire80 it looks like they just blacklisted CX upstream, we have effectively done that with the data attribute. I think our solution is better as it allows us to turn in back on should we come up with a solution.

Heh. It's a shame... I wouldn't object to people using tools to improve their grammar, as long as it doesn't break our articles. Oh well :)

I have shot a mail to Grammarly. Let's see.

I re-enabled Grammarly in the Visual Editor and it seems to work just fine, also when editing a table

EDIT: no, it doesn't work.