TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/121558
Change subject: Edit warning should get value from editors ...................................................................... Edit warning should get value from editors Editwarning needs to make sure that any editor that uses something other than wpTextbox1 to keep the value of the form, is able to write this into the form before we are allowed to leave the page. Otherwise it cannot see the changes and cannot generate an edit warning. Bug: 61056 Change-Id: I24d7096929c4eed36376ef9089d7f1b72a0b6682 --- M resources/mediawiki.action/mediawiki.action.edit.editWarning.js 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/121558/1 diff --git a/resources/mediawiki.action/mediawiki.action.edit.editWarning.js b/resources/mediawiki.action/mediawiki.action.edit.editWarning.js index f8448e6..79f51bf 100644 --- a/resources/mediawiki.action/mediawiki.action.edit.editWarning.js +++ b/resources/mediawiki.action/mediawiki.action.edit.editWarning.js @@ -16,6 +16,14 @@ .on( 'beforeunload.editwarning', function () { var retval; + // Sync content between editor and form + $( '#wpTextbox1, #wpSummary' ).each( function () { + var syncFn = $( this ).data( 'syncEditorWithFormFn' ); + if ( typeof syncFn === 'function' ) { + syncFn(); + } + } ) + // Check if the current values of some form elements are the same as // the original values if ( -- To view, visit https://gerrit.wikimedia.org/r/121558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24d7096929c4eed36376ef9089d7f1b72a0b6682 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ <hartman.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits