r54599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54598‎ | r54599 | r54600 >
Date:20:24, 7 August 2009
Author:tparscal
Status:resolved
Tags:
Comment:
Opera 8 can't get a ref to a form element, so it was just spitting out errors. This checks the form element is valid before trying to use it.
Modified paths:
  • /trunk/phase3/skins/common/edit.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/edit.js
@@ -146,10 +146,11 @@
147147 var editBox = document.getElementById( 'wpTextbox1' );
148148 var scrollTop = document.getElementById( 'wpScrolltop' );
149149 var editForm = document.getElementById( 'editform' );
150 - if( editBox && scrollTop ) {
 150+ if( editForm && editBox && scrollTop ) {
151151 if( scrollTop.value )
152152 editBox.scrollTop = scrollTop.value;
153153 addHandler( editForm, 'submit', function() {
 154+ alert(1);
154155 document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop;
155156 } );
156157 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r54600Removed a debugging statement! r54599 must use this too!tparscal20:24, 7 August 2009
r54742Merge some fixes to Vector skin from trunk:...brion20:57, 10 August 2009

Status & tagging log