Page MenuHomePhabricator

VisualEditor: Handling of double click when preference "Edit pages on double click" is active
Closed, ResolvedPublic

Description

When using the VisualEditor and having the Preference "Edit pages on double click (requires JavaScript)" on, the Editor is stopped as soon as one tries to select a word (= double click)or paragraph (= triple click). The javascript for "Edit pages on double click (requires JavaScript)" needs to be modified to check whether in VisualEditor mode or not (all works ok when in normal editing mode.


Version: unspecified
Severity: minor

Details

Reference
bz43023

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:08 AM
bzimport set Reference to bz43023.

Immediate solution is to suppress the JS when VE is active, but not when in read mode.

Longer-term, this should be refactored so that users have a "default" editor, and this kind of thing triggers whichever one you've chosen.

The surface should just bind a click handler and prevent the event from bubbling up to the handler that mediawiki.action.view.dblClickEdit attaches to $content.

Bumping; didn't make it to 2013-01-16.

This has been fixed by Ie8a35700bc9e in mediawiki core.

In the current configuration however out tabLayout is in "add" more (when this bug was reported, we were still in "replace" mode).

In "add" mode we add an extra tab for "VisualEditor", so the original "Edit" is still there, which is the default. And double-clicking in the content area will (as it should) trigger the original editor.

If/when we enable the "replace" mode again, since this bug is fixed, double-clicking will trigger VisualEditor as expected.

So, although it can't be seen right now, as the feature is not activated right now, this bug as been fixed.

To verify, edit ve.init.mw.ViewPageTarget.js and set this.tabLayout = "replace";.