If you deactivate without saving (e.g. using the back button), the page
contents aren't replaced and so adding the page click handlers is pointless
and harmful because they will run twice.
This was my fault in Iad1713e1
Bug: T135387
Change-Id: I3c83009bfc0f42125cdcde7f7a51de9bc2f72abf
* Ensure ve-loading isn't removed early
* Quickly detach then reattach the loading bar during
activation so it doesn't get moved and marked as original content
Change-Id: I263c9627348953a11966f8bcc435d0d89b0b6084
Define $editableContent on target construction, and mark
all non-ancestor nodes between that at the target container
as uneditable (50% opacity, no pointer events).
Bug: T58289
Change-Id: I7fe51104bd5aa1bd53ffc604e5f02752c7553578
The SupportCheck method asserts that the method is available so use it
instead of the confusingly named jQuery version.
Change-Id: I2105384cc4f6f2ec1cdb24a7bf3b0f4cce7672d3
veswitched and wteswitched together cannot result in any sane behaviour.
To reproduce:
* Open VE (while having multi-tab pref?), switch into WTE
* Make a change
* Switch into VE
Change-Id: I90e19169e3fab60ab876c8e4d349801309db262f
Regression from 863a2c2974.
Sometimes when clicking "Switch to source mode" in the toolbar this
error is thrown and the interface freezes because setEditorPreference()
only returns a promise if the value is different.
> Uncaught TypeError: Cannot read property 'done' of undefined
> - ve.init.mw.DesktopArticleTarget.switchToWikitextEditor
Change-Id: Ie59f06a8ed9af9c4fb8199b013c06992d0c4f700
New changes:
0371bbe [BREAKING CHANGE] Refine VisualEditorSupportCheck call and document pattern
Local changes: Use new VisualEditorSupportCheck pattern
Change-Id: I7dc0c360b54a93397180b18d88d72532e439da5c
New changes:
c02ea46 Clarify documentation of directionality methods
43c9b6f Move initialisation browser support checking from downstream
c89be66 Localisation updates from https://translatewiki.net.
5fb7907 Follow-up c89be66: Fix build for added language 'nan'
fc74fab dm.ElementLinearData.compareElements: Add a few missed test cases
Local changes:
Use initialisation browser support checking from upstream
Depends-On: I27a8e7b4376647f01cee648de987dc3ca6a060d5
Change-Id: I3fc79422ee5e487cf5fae3929fe492f21cd2840a
hideLoading always gets called after activating, not just failing
Follows-up: I13058ae1
Bug: T127184
Change-Id: I47d1892feacbfcf832aa32f689f173601b76c4ba
* Try to hide loading bar on failure
* Don't set wgAction back to 'view' if we're dropping the user back to the
wikitext editor
Bug: T125580
Change-Id: I13058ae131a1dda3b172e78d9b143d70831c47f1
* grunt-contrib-jshint: 0.11.3 -> 0.12.0
This version of the linter cleans up a number of options. 'es5' is now assumed to be
true by default, and replaced as 'esversion'; 'latedef' is extended to also cover
functions' defintions, disabled for us for now; 'futurehostile' is introduced to aid
future-incompatible names for ES6+ support.
I adjusted ve.init.mw.DesktopArticleTarget.init.js based on this, as this file is
meant to be loaded by all JS-capable clients to determine if it is (amongst other
things) capable of ES5, so now we assert ES3 compatibility via jshint.
* grunt-jscs: 2.5.0 -> 2.7.0
Minor version bump that doesn't affect us.
* grunt-jsonlint: 1.0.6 -> 1.0.7
Trivial version bump that doesn't affect us.
Change-Id: Ieb7b6748b0cecf275cfc284fc66617189372461f
* Ensure activating classes are removed by rejecting activatedDeferred
as soon as teardown starts.
* Try to teardown surfaces is surfaces exist, not just if the target is active.
* Remove noop teardownDebugBar. The debugbar lives inside the surface now.
* Ensure progress bar is always reset, even if target setup is aborted.
Bug: T99139
Change-Id: I16a071c0d4bc8bbc6af2e03e63ee0ffc18d55c75
Usually. Unless you load VE, because then you might be loading on
`action=edit` in remember-last mode and therefore the tab text needs to
be updated from "Edit source" to "Edit". Or "Create source" to "Create".
Or the equivalent with 'local description' in the case of pages from
foreign file repos, etc.
Bug: T120970
Change-Id: I8f07be6c8e415b40ad134ee82d0bda1d63cc4f96
Seems we need to make sure this returns before navigating to the target page.
This reverts commit 40807a0743.
Bug: T121122
Change-Id: I4edf03bc0d57b03897d9f1802eabd8f0dd9962b9