Text <input> allows multiple lines to be pasted



UI Design
17 years ago
10 years ago


(Reporter: Scott Gifford (old account), Assigned: Blake Ross)



Dependency tree / graph

Firefox Tracking Flags

(Not tracked)





17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.17-14 i686; en-US; rv:0.8.1+)
BuildID:    2001042608

The text <input> in the form on


will allow multiple lines to be pasted into it    

Reproducible: Always
Steps to Reproduce:
1. Visit http://validator.w3.org/
2. Hilight the text of all lines of the bulleted text
3. Middle-click (paste) into the Address: field

Actual Results:  The textbox contains multiple lines of text.  To see it,
hilight some of the text in the textbox, and move the mouse up or down to make
Mozilla autoscroll.

Expected Results:  Multiple lines shouldn't be in a plain old text <input>. 
Either the multiple lines should be joined together, or all lines after the
first should be ignored.

The reason this matters is that Mozilla doesn't provide an interface to seeing
the multiple lines of text that are there.  So if you inadvertently paste in
multiple lines, there's no way visually to tell that you've done so.  This may
also confuse some CGI scripts.


17 years ago

Comment 1

17 years ago
WFM on 2001042704 Win2k. Looks like a Linux only issue, adding pp keyword.
Keywords: pp

Comment 2

17 years ago
Looks like this might be related to bug 23485.

Comment 3

17 years ago
good find Scott.  That looks like your bug to me.  Marking a duplicate.  

*** This bug has been marked as a duplicate of 23485 ***
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
*** Bug 137375 has been marked as a duplicate of this bug. ***
*** Bug 141853 has been marked as a duplicate of this bug. ***
*** Bug 187785 has been marked as a duplicate of this bug. ***
*** Bug 200300 has been marked as a duplicate of this bug. ***
Reopening.  Bug 23485 is urlbar-specific -- it could be fixed without fixing
this bug, really...  And then this bug would never get fixed.  On the other
hand, fixing this bug would definitely fix bug 23485
Blocks: 23485
Resolution: DUPLICATE → ---
apps, I think...
Assignee: asa → blaker
Component: Browser-General → XP Apps: GUI Features
Ever confirmed: true
QA Contact: doron → paw
Whiteboard: DUPEME

Comment 10

15 years ago
Still present in Firefox 0.8

Comment 11

14 years ago
WFM Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040324
WFM Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040314 Firefox/0.8.0+

with a changing a pref in about:config

editor.singleLine.pasteNewlines user set integer 3

Comment 12

14 years ago
*** Bug 242326 has been marked as a duplicate of this bug. ***

Comment 13

14 years ago
*** Bug 236067 has been marked as a duplicate of this bug. ***


14 years ago
Blocks: 249322
*** Bug 263136 has been marked as a duplicate of this bug. ***
What is the "fix" here? Linux allows multiple line pastes into a single line
text field **deliberately**.

The fix would be to delete the special unix-only pref setting for


Since that was done on purpose I'm WONTFIXing this one.
Last Resolved: 17 years ago14 years ago
Resolution: --- → WONTFIX

Comment 16

14 years ago
I'm not happy with the decision to WONTFIX this bug.  There are single-line
textboxes other than the address bar where it's bad for security if you
unknowingly paste multiple lines.

Comment 17

14 years ago
Deliberately bad UI doesn't make it any less bad.

Right now there's no way to tell that you've pasted multiple lines into an edit
box, and it's extremely difficult to edit the text that's in there, since the
arrow keys don't work properly and there are no scroll bars.  Without any such
interface, this can easily lead to confusing errors and accidentally sending
information that you intend to keep private, and this effect is completely
undiscoverable for a new user.

I would think an acceptable interface would require at least a small scroll bar
along the side of the text box, and working arrow keys.  If this stays WONTFIX,
I can open up a bug for that.

But, unless somebody can think of a useful reason for this behavior, I suggest
that simply changing the default setting for editor.singleLine.pasteNewlines to
1 on Unix would be a much more reasonable fix.
*** Bug 267165 has been marked as a duplicate of this bug. ***

Comment 19

14 years ago
Noteworthy is that the HTML spec explicitly names a input with type="text" to be
*single line*. It also provides a separate inputbox for multiline text which is
of course <textarea>. I see no sense in marking this as WONTFIX while it
violates the HTML specification of this this form element.

It also creates inconsistent behaviour. I've tried other applications on my
Linux desktop and couldn't find one that accepts multiline input the way Mozilla
Product: Core → Mozilla Application Suite
*** Bug 283813 has been marked as a duplicate of this bug. ***

Comment 21

12 years ago
*** Bug 343624 has been marked as a duplicate of this bug. ***

Comment 22

12 years ago
*** Bug 359696 has been marked as a duplicate of this bug. ***

Comment 23

11 years ago
I've just got caught by this problem:
1. I selected some text from a page in Firefox (I thought it was single-line, from what I could see, but...).
2. I pasted it in a single-line input (I could see *exactly* what I thought I had selected).
3. I submitted the form.
To my surprise, there was much more in the selection than I had thought. So, IMHO, this bug should be reopened. This is really a security problem. I'm not requesting that multi-line text should be forbidden in single-line inputs, but at least there should be some warning from Firefox (or some visual information).


10 years ago
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.