Last modified: 2010-05-15 14:35:45 UTC
When a page is accessed with "section=new" on the URL, the user gets a page with a "subject/headline" field and a text box. Currently, if the user types in a subject, and then hits Enter, the form submits, and a new section with this subject and no text is created. I think that this is rarely the desired behavior, and that user confusion over this may be one of the sources of the many "incomplete" article requests on [[WP:AFC]], and some of the ones on the Help Desk and Reference Desk. Could this be changed so that when the user hits Enter the cursor moves into the next text box?
Well, it's not so much a case of what MediaWiki is doing as what browsers do when handling a key press like enter. IE and Firefox, and other graphical browsers, for instance, will look for a "default" button - usually the first submit button in the form - and trigger that. Older or text-based browsers, e.g. Lynx, have to be told to submit manually. I suppose it might be an acceptable compromise to raise hell if a user's comment box is left blank...
You seem to be right. A bit of research told me that this is a known issue with html forms, with a couple of sites telling me how to get around it with Javascript and other ickiness. My HTML is very weak; I've asked on Reference Desk in the hope that someone would post back some crazy oneline solution involving "change this element to this other type of element that'll work identically but prevent that behavior". Short of that panning out, checking whether the comment box is blank might be a good idea. I can't think offhand of any situation where we want to allow empty comment boxes.
Creidiki, this shows everywhere in forms : - A "Tab" key moves the cursor to the next field. - "Enter" validates the default button. People get accustomed to this, but some fields may become mandatory for those who just try and ask a question. This is not a mere bug fix, it is another way to use forms. Let us restrict updates to Wikipedia forms to those usually met by newbies or strangers : Help and Reference desk. Now, is it possible without breaking established wiki habits ? = > It seems better to design a new special page template (see the search page for example). Now, who is OK to do this, and is the priority well defined, I leave this to others. Also, lets us set the Component box to "Special pages".
Simple technical solution; detect if the summary box is blank, and if so, bounce back with a brief error message.
When you type "Enter" in the summary page, the text is blank. This is what people disagree to : Maybe people could give salutations and precisions and sign ? An eror message could be OK.
So have a blank summary or text return to the edit form in "new section" mode?
Definitely for blank text; I *think* it's also the behavior we want for a blank summary. The behavior is only unintuitive-for-new-users when they hit Enter after writing the Summary field; we should prevent a blank textbox. As long as we're checking for that, we might want to check for blank summary too. Returning to the form with a brief error message would be great.
Created attachment 1366 [details] bounce back on blank text Here's a little patch. Since there's code to deal with a blank summary already, I haven't changed the behaviour there. This patch only bounces you back if the main textbox is empty.
Patch applied to CVS.
*note* http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=44239494 shows that it is possible to save a "new section" *without* any "Subject/headline:". If this another bug please open a new request. best regards reinhardt [[user:gangleri]]