Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -348,8 +348,9 @@ |
349 | 349 | cases. |
350 | 350 | * Fix RTL display of the upload form. |
351 | 351 | * Fixed regression in blocking of username '0' |
| 352 | +* (bug 9437) Don't overwrite edit form submission handler when setting up |
| 353 | + edit box scroll position preserve/restore behaviour |
352 | 354 | |
353 | | - |
354 | 355 | == API changes since 1.10 == |
355 | 356 | |
356 | 357 | Full API documentation is available at http://www.mediawiki.org/wiki/API |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1195,7 +1195,7 @@ |
1196 | 1196 | * to ensure that client-side caches don't keep obsolete copies of global |
1197 | 1197 | * styles. |
1198 | 1198 | */ |
1199 | | -$wgStyleVersion = '95'; |
| 1199 | +$wgStyleVersion = '96'; |
1200 | 1200 | |
1201 | 1201 | |
1202 | 1202 | # Server-side caching: |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -778,21 +778,24 @@ |
779 | 779 | document.getElementById(idb).checked=false; |
780 | 780 | } |
781 | 781 | |
| 782 | +/** |
| 783 | + * Restore the edit box scroll state following a preview operation, |
| 784 | + * and set up a form submission handler to remember this state |
| 785 | + */ |
782 | 786 | function scrollEditBox() { |
783 | | - var editBoxEl = document.getElementById("wpTextbox1"); |
784 | | - var scrollTopEl = document.getElementById("wpScrolltop"); |
785 | | - var editFormEl = document.getElementById("editform"); |
786 | | - |
787 | | - if (editBoxEl && scrollTopEl) { |
788 | | - if (scrollTopEl.value) { editBoxEl.scrollTop = scrollTopEl.value; } |
789 | | - editFormEl.onsubmit = function() { |
790 | | - document.getElementById("wpScrolltop").value = document.getElementById("wpTextbox1").scrollTop; |
791 | | - }; |
| 787 | + var editBox = document.getElementById( 'wpTextbox1' ); |
| 788 | + var scrollTop = document.getElementById( 'wpScrolltop' ); |
| 789 | + var editForm = document.getElementById( 'editform' ); |
| 790 | + if( editBox && scrollTop ) { |
| 791 | + if( scrollTop.value ) |
| 792 | + editBox.scrollTop = scrollTop.value; |
| 793 | + addHandler( editForm, 'submit', function() { |
| 794 | + document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop; |
| 795 | + } ); |
792 | 796 | } |
793 | 797 | } |
| 798 | +hookEvent( 'load', scrollEditBox ); |
794 | 799 | |
795 | | -hookEvent("load", scrollEditBox); |
796 | | - |
797 | 800 | var allmessages_nodelist = false; |
798 | 801 | var allmessages_modified = false; |
799 | 802 | var allmessages_timeout = false; |