MaxSem has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/397631 )
Change subject: Fix content changed checks on unload
......................................................................
Fix content changed checks on unload
CM intercepted textSelection() globally but assumed
nobody will ever need to call it for anything but wpTexbox1.
Thus, attempts to get edit summary returned article text.
Lots of things can probably be fixed in this area, but here's
the beginning.
Bug: T177175
Change-Id: I72d7d72b2a891a0ad242a565dddc076fa6dd1bd1
---
M resources/ext.CodeMirror.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror
refs/changes/31/397631/1
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index 03a84f0..25388a4 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -54,7 +54,7 @@
function cmTextSelection( command, options ) {
var fn, retval;
- if ( !codeMirror ) {
+ if ( !codeMirror || this[0].id !== 'wpTextbox1' ) {
return origTextSelection.call( this, command, options );
}
--
To view, visit https://gerrit.wikimedia.org/r/397631
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I72d7d72b2a891a0ad242a565dddc076fa6dd1bd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits