mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
c6b997d0ba
Follows-up I55ef2622c9eacc which activated code introduced in mw.Target in commits before that one that caused a change in the execution order. Hiding of page content (regular wiki page content provided by original view request) must happen before the surface document is focussed. We used to hide the content from mw.ViewPageTarget#setUpSurface, which is called from #onReady, which focusses the document after setUpSurface is done. Most of this code was moved to mw.ViewPageTarget#onSurfaceReady which is the listener for the surfaceReady event emitted from If our surface document gets focus while the original wikipage content container is still there, the view port is forced to scroll down because our surface is the next element sibling after the wikipage container in the DOM. And browsers (apparently Chrome is not affected) naturally retain scroll position even if the elements above the one you "scrolled to" disappear. We can't (and shouldn't) move the hidePageContent call because that's the responsibility of the Target subclass, so instead moved the document focus to below the hidePageContent which is now also part of the responsibility of the Target subclass. Also: * Removed target.surfaceOptions reference because that property does not exist. We never passed a second argument here, and whatever this was intended for, doesn't exist. Bug: 58089 Change-Id: I230fbd5401cbd6e3b9450c7f156650409be8ef16 |
||
---|---|---|
.docs | ||
bin | ||
demos | ||
maintenance | ||
modules | ||
.csslintignore | ||
.csslintrc | ||
.gitignore | ||
.gitreview | ||
.jscs.json | ||
.jshintignore | ||
.jshintrc | ||
ApiVisualEditor.php | ||
ApiVisualEditorEdit.php | ||
AUTHORS.txt | ||
betafeatures-icon-VisualEditor-formulae-ltr.svg | ||
betafeatures-icon-VisualEditor-formulae-rtl.svg | ||
betafeatures-icon-VisualEditor-ltr.svg | ||
betafeatures-icon-VisualEditor-rtl.svg | ||
CONTRIBUTING.md | ||
Gruntfile.js | ||
LICENSE.txt | ||
package.json | ||
README.md | ||
VisualEditor.hooks.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php | ||
VisualEditorDataModule.php |
VisualEditor
VisualEditor provides a visual editor for wiki pages. It is written in JavaScript and runs in a web browser.
It uses the Parsoid parser to convert wikitext documents to annotated HTML which the VisualEditor is able to load, modify and emit back to Parsoid at which point it is converted back into wikitext.
For more information about these projects, check out the VisualEditor and Parsoid pages on mediawiki.
Developing and installing
For information on installing VisualEditor on a local wiki, please see https://www.mediawiki.org/wiki/Extension:VisualEditor
For information about running tests and contributing code to VisualEditor, see CODING.md. Patch submissions are reviewed and managed with Gerrit. There is also API documentation available for the VisualEditor.