Closed Bug 536857 Opened 10 years ago Closed 10 years ago

It's possible to insert more than one line into a single line input field but only last line is shown

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Maemo
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jukey, Assigned: Gavin)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6
Build Identifier: Mozilla 5.0 (X11; Linux armv7l; en-US; rv:1.9.2b6pre) Gecko/20091225 - Firefox/3.6b6pre Fennec/1.0b6pre

Only the last line is shown if you insert a multi line string into a single line input field.

Reproducible: Always

Steps to Reproduce:
1. Open a plain text editor and enter:
line1
line2
(line1 RETURN line2)
2. Mark the text in both lines and copy it 
3. Paste the copied text into a single line input field (like the search field on en.wikipedia.org) using fennec.
Actual Results:  
"line2" is shown. Move the cursor to the begin of the line and than press one more time the left arrow: "line1" is shown. Press right arrow: line2 is shown.

Expected Results:  
Like in firefox on desktop the line feed sign should be ignored and both lines should appear in the single line:
line1 line2
This is controlled by the editor.singleLine.pasteNewlines pref. Valid values are:

66   const long eNewlinesPasteIntact                = 0;
67   const long eNewlinesPasteToFirst               = 1;
68   const long eNewlinesReplaceWithSpaces          = 2;
69   const long eNewlinesStrip                      = 3;
70   const long eNewlinesReplaceWithCommas          = 4;
71   const long eNewlinesStripSurroundingWhitespace = 5;

Firefox uses "1" for Linux (paste only the first non-empty line), and "2" otherwise (paste everything, replacing newlines with spaces). Not sure why Linux is different - I think we probably want "2" across the board?
Status: UNCONFIRMED → NEW
Ever confirmed: true
> I think we probably want "2" across the board?

Sounds good to me
(In reply to comment #1)
> Firefox uses "1" for Linux (paste only the first non-empty line), and "2"
> otherwise (paste everything, replacing newlines with spaces).

I was wrong about this, that was for the platform default. Firefox uses 2 across the board.
Attached patch patchSplinter Review
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #423205 - Flags: review?(mark.finkle)
Attachment #423205 - Flags: review?(mark.finkle) → review+
Whiteboard: [fennec-checkin-post1.0]
pushed:
http://hg.mozilla.org/mobile-browser/rev/ee82e1a8fe82
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-checkin-post1.0]
verified FIXED on builds:

Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2.2pre) Gecko/20100217 Namoroka/3.6.2pre Fennec/1.1a2pre

and

Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.3a2pre) Gecko/20100217 Namoroka/3.7a2pre Fennec/1.1a2pre

We need a copy and paste testcase in our litmus BFTs. I'll use this bug as a placeholder for such a thing.
Status: RESOLVED → VERIFIED
Flags: in-litmus?
Component: Linux/Maemo → General
OS: Linux → Linux (embedded)
QA Contact: maemo-linux → general
Hardware: Other → ARM
Assignee: gavin.sharp → nhirata.bugzilla
Assignee: nhirata.bugzilla → gavin.sharp
Flags: in-litmus? → in-litmus?(nhirata.bugzilla)
You need to log in before you can comment on or make changes to this bug.