Opera 8 can't get a ref to a form element, so it was just spitting out errors. This...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 7 Aug 2009 20:24:10 +0000 (20:24 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 7 Aug 2009 20:24:10 +0000 (20:24 +0000)
skins/common/edit.js

index 94c24a2..2941b86 100644 (file)
@@ -146,10 +146,11 @@ function scrollEditBox() {
        var editBox = document.getElementById( 'wpTextbox1' );
        var scrollTop = document.getElementById( 'wpScrolltop' );
        var editForm = document.getElementById( 'editform' );
-       if( editBox && scrollTop ) {
+       if( editForm && editBox && scrollTop ) {
                if( scrollTop.value )
                        editBox.scrollTop = scrollTop.value;
                addHandler( editForm, 'submit', function() {
+                       alert(1);
                        document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop;
                } );
        }