Last modified: 2014-04-24 23:02:41 UTC
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. 2. Click outside the main editing area. For example, highlight part of the page title, or put the cursor in the search box. 3. 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.
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
Presuming that this is now FIXED.
Verified the fix in test2
Verified the fix in production:https://en.wikipedia.org/w/index.php?title=User:RYasmeen_%28WMF%29/sandbox&veaction=edit