VisualEditor: When editor is unavailable, edit menu item can re-appear
Closed, ResolvedPublic


Steps to Reproduce:

  1. Open a Wikipedia article in the article namespace.
  1. Resize the window to a very small size so that the buttons overlap to the next line.
  1. Resize the window to the original size and see that the "Edit beta" button shows up, which was previously not there.
  1. Click on the new button to open VisualEditor.

Actual Results:
Clicking the button produces an error message:

Error loading data from server: novenamespace: VisualEditor is not enabled in namespace 4. Would you like to retry?

Clicking OK closes this dialog, but immediately pops up another one of the same kind.

Expected Results:
That the button wouldn't ever be visible, and that if it were, that it wouldn't give an error message about namespace 4.

Reproducible: Didn't try

Version: unspecified
Severity: minor

bzimport set Reference to bz65292.
Whatamidoing-WMF created this task.Via LegacyMay 14 2014, 4:52 PM
Krinkle added a comment.Via ConduitMay 14 2014, 5:32 PM

Rephrasing bug title as bug is broader in scope.

The window resize bug is actually caused by a logic error in Vector in MediaWiki core (filed as bug 65294).

So it affects all browsers, and can bypass any soft restriction that we evaluate in javascript (browser support, namespace, content model, user preference etc.).

Because it's basically just always made to be visible regardless of why it was hidden, when doing the resize handle trick from minimum width back out.

gerritbot added a comment.Via ConduitMay 16 2014, 11:46 PM

Change 133851 had a related patch set uploaded by Alex Monk:
Remove edit tab from the DOM if it's hidden

gerritbot added a comment.Via ConduitMay 19 2014, 5:51 PM

Change 133851 merged by jenkins-bot:
Remove edit tab from the DOM if it's hidden

Add Comment