This aligns them with the mobile wikitext editor. At mobile
widths the difference is negligible. On tablets this distinguishes
"navigation" buttons from the surface toolbar buttons.
Bug: T344370
Change-Id: I342e3bb579afb9f26e2af743e28eedb32efa3d46
This allows the proper "discard changes" dialog to show.
A few more steps of the teardown now happen in the client,
but eventually in DesktopArticleTarget#teardown we check
again if we weren't on a view page and redirect (as this
is what we do after save).
Bug: T379367
Change-Id: I995649f37e5d841b6c1784a74f3bd353adfbe69f
This object just contained a pointer to the surface and dm,
and had one utility method.
Move the method to mw.editcheck, and pass around a surface model
or document model to other methods as appropriate.
Change-Id: Ie81d76dea2823b633328f982ee20027808bfc8e3
Otherwise the changes to mw.widgets.TitleWidget in
Iec338e9f595b452c19ce8e74eb81339fbce11640 cause the test to fail.
To avoid making real API requests, use fake server instead.
Change-Id: I7ff705af79760e33200a2dfbfdd05138c18bb110
When loading the editor fails, getTarget() should return a rejected
promise. However, the rejection handler that logs the loading error
also accidentally converted the promise to a resolved one.
The easiest way to reproduce is to enable offline mode in your
browser's developer tools, then click "Edit".
Change-Id: Icf6ea14f4d4e3afcb6608f4c0c49b76c297bf9a3
Use rem's to set the font size of the toolbar and local/global
overlays, as the font size is now variable in that skin.
Bug: T373875
Change-Id: Ib2511debd01dbc0cf03ff6d92cd9bfe71078c387
Listeners will already know which object emitted the event.
Currently this event is used once as a aggregate event,
(as 'editItem' in the ve.ui.MWGalleryGroupWidget constructor)
in which case the emitting object is already prepended as the
first argument (as documented in OO.EmitterList.prototype.aggregate).
Change-Id: I490f368af8e9cae60eacac918bf83702999f705b
As described in T326169, when editing a (manually created) cross-wiki redirect,
VisualEditor will throw a null dereference exception causing it to fail to load
in the browser (looking like it is just taking forever to load).
This patch prevents the exception from occurring by not attempting to write to
the null object.
Bug: T326169
Change-Id: I50fa803c7b4ce65dac1fe345431d8b8f9d0b3d61
…but not when we were previously logged-in. Temporary accounts no
longer leak IP addresses, but it's still not nice to lose attribution
of edits by logged-in users.
Follow-up to 317d6dd724.
Bug: T345975
Change-Id: I24c786c0f060921f773e1d6d1c7463f1cc79aab2
A notice already appears and informs the user of the visual editor that
they're not logged in if their session has ended. Showing an additional
error dialog informing the editor of this when saving changes is not
needed.
Bug: T345975
Change-Id: I20a904dbc6d3c2f0d08e4ceea27e35ee1b65bb71
MediaWiki needs this even without VisualEditor so let's move it there.
Bug: T371702
Depends-On: I4dcfa3916a07e92565b5667adb2ead0115fdb438
Change-Id: I0562ea1e5bd28eabd3ef0bcd8372155da67bcd0c
This also resolves the bug but it hides the underlying issue on it
that's why I like to have this but after having
Ia7dd8076c8789ed04d3fb52a078c70561ee5c6f8
Bug: T371665
Change-Id: I7340829acbd2bf3fcccfb631848964e5338470b0
According to ECMAScript, .trim() and RegExp’s "\s" capture the same
characters, so I replace the initial "\s*" by .trim() to remove
whitespaces and line terminators at the beginning and at the end.
Bug: T371000
Change-Id: Id9188f97a3136b986b052b71cd4079c1109ea8ff
This can be reenabled once Cite changes are merged.
The disabled test is also updated in this patch so that it will pass
with the new Cite code.
Bug: T370512
Change-Id: I56b52c399d2c76689fdcb0bc7fd50a8c0ced28fd
Without this, wheneve VE is installed, test execution ends with the
address bar rewritten to Special:Badtitle, which affects reloads etc
and makes debugging anything else harder.
Bug: T250045
Change-Id: Ic453ae388c842369ff1cb1e84dcad4a8bbc7d54f
I spent a couple minutes looking at this before I saw that we needed
`this.updateVisibility()` to only fire if the loop iterated at least
once.
Change-Id: I7d03f73a35e3ded539898effa064dc0e14ba595f
transitionend is supported by all our target browsers.
Also use requestAnimationFrame without a fallback as
this is also supported by all browsers.
Change-Id: I563cacdc8b2365ad4b69dfccb7e46a9f176dbd9b