TheDJ has uploaded a new change for review.
https://gerrit.wikimedia.org/r/198107
Change subject: Live preview: Disable if there is no wpTextbox1
......................................................................
Live preview: Disable if there is no wpTextbox1
ProofreadPage has custom editforms for Index pages, which are not
supported by the API. These editforms have no wpTextbox1, so disable
live preview in that case.
Bug: T78709
Change-Id: I90cba79e5a4a756454741c4070ebdf620520ab55
---
M resources/src/mediawiki.action/mediawiki.action.edit.preview.js
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/07/198107/1
diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
index 3bf8e32..84bde7d 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
@@ -205,7 +205,8 @@
$( function () {
// Do not enable on user .js/.css pages, as there's no sane way
of "previewing"
// the scripts or styles without reloading the page.
- if ( $( '#mw-userjsyoucanpreview' ).length || $(
'#mw-usercssyoucanpreview' ).length ) {
+ // Do not enable for ProofreadPage Index page editors, which
have no textbox
+ if ( $( '#mw-userjsyoucanpreview' ).length || $(
'#mw-usercssyoucanpreview' ).length || $( '#wpTextbox1' ).length === 0 ) {
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/198107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90cba79e5a4a756454741c4070ebdf620520ab55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits