Page MenuHomePhabricator

VisualEditor: Gracefully handle when available browser UI features are disabled (rather than refusing to load)
Open, LowPublicFeature

Description

VE should work as expected without clipboard access. Currently it only half initalises.

  1. Install Kill Evil in Chrome or similar
  2. Edit any page

(https://chrome.google.com/webstore/detail/kill-evil/epieehnpcepgfiildhdklacomihpoldk)

Result:
https://en.wikipedia.org/wiki/File:Missing-ui-ve.png


Version: unspecified
Severity: enhancement

Details

Reference
bz52008

Event Timeline

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

That's more likely caused by the "getSelection and onselectstart/onmousedown" part of that extension.

That too ;-) Making the bug more general. Hopefully VE is able to be at least partially functional without all those fancy things.

This isn't a fancy thing. You can't do things like bold the selection if you can't access information about what is actually selected.

When 'Kill Evil' addon exists, there are two failures to load modules, and then an exception which halts the VE initialisation half way.

Module 'WrappedSelection' failed to load: Module 'WrappedSelection' failed to load: No means of selecting a Range or TextRange was found rangy-core-1.3.js:105

Module 'Position' failed to load: required module 'WrappedSelection' not supported rangy-core-1.3.js:105

Uncaught TypeError: Object #<WrappedSelection> has no method 'refresh' rangy-core-1.3.js:3035

WrappedSelection rangy-core-1.3.js:3035
getSelection rangy-core-1.3.js:3084
ve.ce.Surface.showSelection ve.ce.Surface.js:1325
ve.ce.Surface.onChange ve.ce.Surface.js:747
oo.EventEmitter.emit oo.js:421
ve.dm.Surface.change ve.dm.Surface.js:402
ve.dm.SurfaceFragment.select ve.dm.SurfaceFragment.js:448
ve.ui.Surface.initialize ve.ui.Surface.js:81
(anonymous function) ve.init.mw.ViewPageTarget.js:1098
proxy load.php?debug=true&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.t…%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130725T023359Z:775

in ve.ui.Surface method initialize, the following invocation should probably be skipped if those rangy modules have failed to load.

// By re-asserting the current selection and forcing a poll we force selection to be something
// reasonable - otherwise in Firefox, the initial selection is (0,0), causing bug 42277
this.model.getFragment().select();
Esanders subscribed.

This little used extension kills APIs that are essential for VE to work.

@Esanders I agree, but perhaps we should also be better about error handling in general when an app such as VE fails to launch. There is no problem with not supporting Kill Evil, but I think there is a problem of ending up in a half initiated state with no user feedback right ?

I think that is an area that we could be better at (be it VE, UploadWizard or what not).

People disable these features for good reason; a nice error message, or even an ugly error message, would be helpful to let them know why VE wont load.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: rmoen.