Closed Bug 471939 Opened 16 years ago Closed 14 years ago

Can not put carriage return in to online text box

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mason.paul, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5

When filling in an on line text box on some sites,usually on line office suoolie cataloges, it is not possible to use the eter key to end one and start another paragraph.


Reproducible: Always

Steps to Reproduce:
1.Star Fire Fix as normal
2.Go to http://www.snappyofficesupplies.com/enquiries.aspx, one of the sites where I'm having a problem
3.Fill in the enquiries form, attempt to use more than one paragrph use the enter key to TRY to end one paragraph and star another.
Actual Results:  
The paragrap break dose not work in some cases it actuall acts as if the SEND key/button has been pressed The request is sent finished or not

Expected Results:  
The enter/return key should, when pressed twice, end one paragrph and start a new paragraph with at lest one blank line between them

This seems to be on some but not all sites, might be to do with some code on the sites, but have never had this problem with other browsers.

Using somthing like note pad gives a long winded work around and its time consuming if in a hurry, typing the message in - high lighting/selecting it all - right click copy - change to site - click in the message box - right click - paste - send, when only two steps should be needed, type message - send
Component: Shell Integration → Layout: Form Controls
Product: Firefox → Core
QA Contact: shell.integration → layout.form-controls
The site in question has a keypress handler that submits the form when enter is pressed anywhere inside the form.  Not a Gecko bug as far as I can tell.  Feel free to complain to the site about their poor user interface!

It's a little odd that this doesn't happen in other browsers, though.  Do they not bubble the keypress event from the textarea?  Or does the site do browser-sniffing of some sort?
Attached file unminimized testcase
The problem is this line of code:
        if (event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) {

So they're relying on a event.srcElement object, which doesn't exist in Mozilla, since it's a typical IE invention.
Opera and Google Chrome (khtml) don't seem to choke on this code, so I guess they support .srcElement.
Ah, ok.  Evangelism, then.
Assignee: nobody → english-us
Status: UNCONFIRMED → NEW
Component: Layout: Form Controls → English US
Ever confirmed: true
Product: Core → Tech Evangelism
QA Contact: layout.form-controls → english-us
Presumably this is All/All, rather than x86/Windows-specific...
OS: Windows Vista → All
Hardware: x86 → All
Summary: Can not put carrage return in to online teaxt box → Can not put carriage return in to online text box
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: