Last modified: 2011-03-13 18:06:32 UTC
When initally editing a section or page, the text area and "Save page" and "Show preview" buttons are what the user is focusing on. It would be nice if the page automatically scrolled the buttons into view. After the wpPreview submit button is addHTMLed in /includes/EditPage.php (line 548?), it would be nice if this code was added: if ( 'preview' != $formtype) { $wgOut->addHTML( "<script type='text/javascript'> /* Try to scroll the wpPreview button into view */ if(document.getElementById) {var target = document.getElementById('wpPreview');} else {var target = document.all.wpPreview;} if(window.showModalDialog && window.clipboardData && window.createPopup) { window.scroll(0,0); var range = target.createTextRange(); range.scrollIntoView(); window.scrollBy(0,6); } else { var buttonOffset = target.offsetTop + target.offsetParent.offsetTop; var buttonScroll = document.body.scrollTop; if((buttonOffset + target.clientHeight) > (buttonScroll + document.body.clientHeight)) { target.scrollIntoView(false); } else if(buttonOffset < buttonScroll) {target.scrollIntoView(true);} } </script>" );
Created attachment 848 [details] This is the way I added the enhancement on my private copy of WikiMedia.
This would be generally confusing, and likely to obscure titles, messages, etc. Causing things to jump about unexpectedly is rarely a good idea.