Last modified: 2010-05-15 14:35:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4273 - "New section" editing page should not submit when user hits Enter in Summary field.
"New section" editing page should not submit when user hits Enter in Summary ...
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-12-14 14:56 UTC by M. Creidieki Crouch
Modified: 2010-05-15 14:35 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

bounce back on blank text (1.63 KB, patch)
2006-02-04 19:21 UTC, Lupin

Description M. Creidieki Crouch 2005-12-14 14:56:39 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?
Comment 1 Rob Church 2005-12-14 15:13:44 UTC
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...
Comment 2 M. Creidieki Crouch 2005-12-14 20:15:31 UTC
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.
Comment 3 Harvestman 2006-01-17 21:14:48 UTC
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".
Comment 4 Rob Church 2006-01-17 23:34:46 UTC
Simple technical solution; detect if the summary box is blank, and if so, bounce
back with a brief error message.
Comment 5 Harvestman 2006-01-21 23:19:11 UTC
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.
Comment 6 Rob Church 2006-01-21 23:23:47 UTC
So have a blank summary or text return to the edit form in "new section" mode?
Comment 7 M. Creidieki Crouch 2006-01-22 02:42:39 UTC
Definitely for blank text; I *think* it's also the behavior we want for a blank

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.
Comment 8 Lupin 2006-02-04 19:21:25 UTC
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.
Comment 9 Lupin 2006-03-01 23:01:02 UTC
Patch applied to CVS.
Comment 10 lɛʁi לערי ריינהארט 2006-03-17 18:04:04 UTC
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]]

Note You need to log in before you can comment on or make changes to this bug.