Page MenuHomePhabricator

VisualEditor: [Regression pre-wmf1] Items in the page options menu stop working if you click outside the main editing area
Closed, ResolvedPublic

Description

Intention:
See if I could reproduce Alex's bug. I could.

Steps to Reproduce:

  1. Click http://en.wikipedia.beta.wmflabs.org/wiki/User:Whatamidoing_(WMF)/Sandbox?veaction=edit or open another page in VisualEditor.
  1. Click outside the main editing area. For example, highlight part of the page title, or put the cursor in the search box.
  1. While your cursor is still outside the editing area, click the page options menu (three bars icon) and choose any item. For example, choose "Categories". (Perhaps you just used the search box to figure out how to spell the name of the category you're interested in adding, and that's why your cursor is in the search box.)

Actual Results:
Nothing happens. "Switch to source editing" is the only menu item that produces a response.

Expected Results:
Normal editing behavior. It doesn't matter where my cursor is placed for these items, so they shouldn't care.

Reproducible: Always

Confirmed in Safari 6 and Firefox 28 on Mac OS 10.8.5, and assumed to affect everything.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=63954

Details

Reference
bz63945

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:24 AM
bzimport set Reference to bz63945.

I found this on Chrome 33 on Ubuntu 13.10.

Error if you try to open something like Page settings (or most other items on that list):
Uncaught TypeError: Cannot read property 'start' of null
ve.Document.selectNodes
ve.ce.Document.getDirectionFromRange
ve.ui.DialogAction.open
ve.ui.Surface.execute
ve.ui.Command.execute
ve.ui.Tool.onSelect
OO.ui.ToolGroup.onMouseUp
OO.ui.PopupToolGroup.onMouseUp
proxy
jQuery.event.dispatch
elemData.handle.eventHandle

Error if you try to type in the main text editing area:
Uncaught TypeError: Cannot call method 'isCollapsed' of null
ve.ce.Surface.handleInsertion
ve.ce.Surface.onDocumentKeyPress
proxy
ve.EventSequencer.onEvent
(anonymous function)
jQuery.event.dispatch
elemData.handle.eventHandle

CCing Roan - James mentioned earlier that he was working on something like this yesterday.

Change 126058 had a related patch set uploaded by Trevor Parscal:
Use document direction when a fragment has a null range

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

Change 126058 merged by jenkins-bot:
Use document direction when a fragment has a null range

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