(fix regression) Don't select the edit box on preview; this interferes with seeing...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Dec 2003 05:52:15 +0000 (05:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Dec 2003 05:52:15 +0000 (05:52 +0000)
includes/EditPage.php

index ef6f6af..dd2bd08 100644 (file)
@@ -288,7 +288,10 @@ class EditPage {
                        $editsummary="{$summary}: <input tabindex=3 type=text value=\"{$wpSummary}\" name=\"wpSummary\" maxlength=200 size=60><br>";
                }
 
-               $wgOut->setOnloadHandler( "document.editform.wpTextbox1.focus()" );
+               if( $_GET["action"] == "edit" ) {
+                       # Don't select the edit box on preview; this interferes with seeing what's going on.
+                       $wgOut->setOnloadHandler( "document.editform.wpTextbox1.focus()" );
+               }
                $wgOut->addHTML( "
 <form id=\"editform\" name=\"editform\" method=\"post\" action=\"$action\"
 enctype=\"application/x-www-form-urlencoded\">