Grammarly and VisualEditor
Open, LowPublic1 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.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 19 2017, 12:42 PM
DLynch added a subscriber: DLynch.May 19 2017, 12:57 PM

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 added a subscriber: Framawiki.
Deskana triaged this task as High priority.May 31 2017, 11:44 AM
Deskana changed the task status from Open to Stalled.
Deskana moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Deskana added a subscriber: Deskana.

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 set the point value for this task to 1.Jul 31 2017, 7:04 PM
Deskana closed this task as Resolved.
Deskana assigned this task to Esanders.

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!

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptJul 31 2017, 7:04 PM

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

Amire80 added a subscriber: Amire80.Aug 4 2017, 9:57 AM

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

Ryasmeen added a comment.EditedAug 4 2017, 10:02 PM

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.

Ryasmeen reopened this task as Open.Aug 4 2017, 10:06 PM

@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 :)

Deskana moved this task from TR0: Interrupt to Backlog on the VisualEditor board.
Deskana removed Esanders as the assignee of this task.Oct 16 2017, 12:57 PM