Parsoid added a class and, without it, we get selser complaining
about wrappers being modified, similar to T214649.
The "image" class is removed since Parsoid never added it (although it
now has "mw-file-description" for a similar purpose) and the legacy
parser doesn't apply it indiscriminately.
It doesn't seem like VE supports editing the |link= media option; it
just tries to roundtrip what's there and drops it on edit. The patch
here works with that limitation.
Galleries are found to drop href's, breaking selser, and should be fixed
in a follow up.
Bug: T292657
Bug: T303469
Change-Id: I92359048b42d32fe8a0f2cb79cd348cf5f2c56cc
It removes some indirection.
* Find: \$\( '<.+?' \)\.toArray\(\)
* Replace with: $.parseHTML( \1 )
(also replaced a few by hand that weren't caught by that regexp)
Change-Id: I2639cc4a26bc960046a189504dd8058344e14d60
New changes:
cf7b2a9c4 Restore margin between wrapper paragraphs and document edge
629109b6b ve.ce.Surface tests: Sometimes assert originalDomElements in paste tests
3a5bd323c Use wrapper paragraphs in fixUpInsertion
Local changes:
* Update tests to ignore some internal properties
Bug: T299815
Bug: T299817
Change-Id: Ie52348f62320eb135c2f950ac78a77d9c665fef2
This was added back in 2020 so mw:DisplaySpace would work while the
RESTBase cache still contained old data. It's been two years, it should
be good now.
Follow-up to ed3579245e
Change-Id: I65665231b78198633682d52c48068c89807df55e
Once we determined a link is internal from the first regex, we don't to
check if it matches the wgScript path as well. This would cause
"/index.php/Article" style paths to be detected as external as they failed
this second check.
Change-Id: I560d8080c513c523c68f2750be332e9fd91de192
This logic has been moved to the relevant extensions which can
now disable VE using a hook.
Depends-On: I47880be15b6ce1a93f389a32aff304cc3b798bcb
Depends-On: If188e8fcceb248738fc625ddd5afec351c01c484
Bug: T174180
Change-Id: I245295373af3caffb1d4cbc288e8d2bd008520b7
* I can't guarantee this fixes T301914. But I suspect the bug can not
be triggered any more with this plus If9b6050 in place.
* I wasn't able to reproduce the issue locally. But I learned that
1. it's related to the hotkey, and
2. it's because the dialog looses focus, and the focus ends on the
VE surface in te background. Pressing Esc there closes VE. That's
intended behavior.
* I tried to use .trigger( 'click' ), but it doesn't make much of a
difference. The only magic check is if the button is disabled. But no
visibility checks are done.
Bug: T301914
Change-Id: I2f66fc2411144c60cd08baae58452d336b4e9802
In a test case with 200 templates where all but a few parameters are
unused the loading time is cut in half.
Bug: T300974
Change-Id: Ice850cb9e5e95b9e3a19ff511b3a4f32117c7199
Our theory is that browser plugin spam shouldn't reach
the DM document unless we've made a coding error like
I194ff1d57. Log future errors so if there is more plugin
spam in the future, we can investigate the cause.
Bug: T298147
Depends-On: I705195bc5d0f76a38da5d2cc09fab184a2c32401
Change-Id: I3403859906ceaa51be63b0d79f474f0289ab4408
Same random finds while working on something else. I carefully
checked and made sure these methods are actually called without the
optional parameter.
Change-Id: Iab36fd130258322985b5d6e7f8e1f7b4ee235ba2
This focuses on a few trivial cases where the syntax helps making
the code more readable. One level of indirection is gone with this.
Change-Id: Ibf25d7eaa06952e69b36bd5a78a48d04ac62890c
These are only needed when we need to access a specific `this` from
within another `function () {}` context. This is not the case in the
situations here.
This is split from Ibf25d7e to make it smaller and easier to argue
about.
Change-Id: Ide1476de91fc343aa992ad92a1321d3a38b06dd0
The `.` character class matches any character *except* line terminators,
but edit summaries can contain those. Use [^] to match truly everything
in the comment part. (In the section part, I assume `.` is okay.)
Bug: T302103
Change-Id: I29fcdd7489d118674bab5cfe5c0a15b8e4efac64
Passing the useskin parameter ensures that output hooks are run
on the new page HTML. This already happens because we request
the 'subtitle' and 'categorieshtml' props which also trigger
skin mode (along with the 'headhtml' which we don't request).
However it is better for us to be explicit that we want the rendering
for a specific skin, rather than relying on these props to trigger
the correct mode.
Also pass through mobileformat param, which is added by a hook
in MobileFrontend.
Change-Id: I1cd2c5c5c13ae0b90cc32e441b453532343a434a
This ensures the full loading sequence is shown when the
user opens VE using history navigation.
Bug: T301843
Change-Id: Ia7a641c8bd5a036f23c9da94bc539d8cf66c5021
Previously we were adding an event listener every time the
target was opened, and not removing the old ones.
Change-Id: I0ce609f1d9e2d6fb00b605dcade6f27e7a887b9d
Found via Iaf989bc50363a (patch set 6):
> FAILED TESTS:
> ve.init.mw.DesktopArticleTarget
> ✖ init
> Died on test #1
> TypeError: Cannot set property 'pageLanguageCode' of null
> at Object.<anonymous>
Bug: T89434
Change-Id: I8ad2cc4c115224eb276d1488091b9518fde739f9