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


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



Version: unspecified
Severity: enhancement

bzimport set Reference to bz52008.
jayvdb created this task.Via LegacyJul 25 2013, 12:45 AM
matmarex added a comment.Via ConduitJul 25 2013, 12:52 AM

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

jayvdb added a comment.Via ConduitJul 25 2013, 1:03 AM

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

matmarex added a comment.Via ConduitJul 25 2013, 1:15 AM

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.

jayvdb added a comment.Via ConduitJul 25 2013, 4:54 AM

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.ui.Surface.initialize ve.ui.Surface.js:81
(anonymous function)
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
Jdforrester-WMF added a comment.Via ConduitJan 22 2014, 6:58 PM

Sorry for very slow triage.

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 4:24 PM

Add Comment