The live preview feature when enabled
makes various assumptions about the HTML of the page
when I edit https://fr.wikipedia.org/w/index.php?title=Utilisateur:Jon_(WMF)/draft&action=edit:
This results in the max width applying twice.
QA steps
QA in production.
- Visit https://he.wikipedia.org/wiki/%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%94%D7%A2%D7%93%D7%A4%D7%95%D7%AA?uselang=en#mw-prefsection-editing and select "Show previews without reloading the page"
- Visit https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Jdlrobson/sandbox&action=edit and click "preview". The preview should show above the edit box without reloading the page.
Developer notes
Looking at https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.action/mediawiki.action.edit.preview.js$44 it makes all sorts of assumptions about the HTML, for example how indicators and categories apply.
On the short term this feature should probably not be loaded on modern Vector:
https://gerrit.wikimedia.org/g/mediawiki/core/+/55a2f2be4da70298e45cdc605059ca6e8753fe5d/includes/EditPage.php#2637
On long term, we should avoid making all these brittle assumptions about the HTML and add a proper API for making such changes.