Page MenuHomePhabricator

MobileFrontend: VisualEditor loads without a cursor due to blurring of all CE elements
Closed, InvalidPublic

Description

On desktop, as soon as the visual editor is loaded, the cursor is activated at the beginning of the page content. This doesn't happen in the mobile version.

Clicking on the page content after the editor has loaded then has inconsistent behavior between browsers. In Firefox, clicking anywhere in the page content inserts the cursor at the beginning of the content. In Webkit browsers, it inserts the cursor at the click location.

I believe that fixing the first problem will also fix the second problem in for free.


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

Details

Reference
bz57177

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:18 AM
bzimport set Reference to bz57177.

This is in reference to Rob's prototype mobile visual editor. https://gerrit.wikimedia.org/r/#/c/93916/

We would like to have this fixed before we push mobile VE to stable if possible. Any update on it?

(In reply to Ryan Kaldari from comment #2)

We would like to have this fixed before we push mobile VE to stable if
possible. Any update on it?

… no? Bugs in VE/Mobile have been awaiting triage and action by the Mobile since this was agreed in 2012. We can have a look at it now, though.

This is caused by code in MF, line 152 of VisualEditorOverlay.js:

for some reason the first time contenteditables are focused, focus
event doesn't fire if we don't blur them first
this.$( '[contenteditable]' ).blur();

The code was added to fix bug 61240.

According to Juliusz this is on purpose as tablets require an actual tap to activate the virtual keyboard.