Page MenuHomePhabricator

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

Description

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

Details

Reference
bz65292

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:09 AM
bzimport set Reference to bz65292.

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.

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

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

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

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