Closed Bug 229203 Opened 21 years ago Closed 21 years ago

Need ability to convert new lines into commas for paste into single line text box

Categories

(Core :: DOM: Editor, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: mscott, Assigned: mscott)

References

Details

Attachments

(1 file)

Thunderbird needs a way to make new lines get converted to commas when getting
pasted into a single line text box. 

We need this to have 4.x partity for the following scenario:
1) Select a group of cells from a spreadsheet like Excel that contain names.
2) Paste that group into the addressing widget. 

4.x would convert those new lines to commas and then we would autocomplete each
one of the comma delimited names.

Currently, we loose all the data except for the first name when we paste because
our current behvior for single line text inputs is to forget everything after
the first new line.
Attached patch the fixSplinter Review
I'm spinning this patch out of the overall patch for Bug #227206 since it
requires editor module owner approval.

The pref is only set to replace with commas for thunderbird, we leave everyone
else alone.

One drawback with this solution is that we can't make it work for mozilla
mailnews , since that would require change the pref for all input boxes in
seamonkey.
Blocks: 227206
Status: NEW → ASSIGNED
Comment on attachment 137854 [details] [diff] [review]
the fix

asking Kin for a module owner review. He may have a different way he'd like to
solve this that would work for seamonkey and not just thunderbird.
Attachment #137854 - Flags: review?(kinmoz)
Comment on attachment 137854 [details] [diff] [review]
the fix

Daniel, are you ok with adding this functionality to editor to convert new
lines into commas if the pref is set to a value of 4? Prefs already exist to
convert them to spaces, newlines, just the first line, etc. 

This would fix the problem for thunderbird because I can just set the pref to
force newlines to be commas. It won't work for seamonkey though because
seamonkey has other single line text box widgets which won't want this behavior
and the pref is global not per text box.
Attachment #137854 - Flags: review?(kinmoz) → review?(daniel)
Comment on attachment 137854 [details] [diff] [review]
the fix

no problem

r=daniel@glazman.org
moa=daniel@glazman.org for editor

Scott, please place definition for enum value eReplaceWithCommas on a new line
so we keep lines of two values; thanks.
Attachment #137854 - Flags: review?(daniel) → review+
Attachment #137854 - Flags: superreview?(bienvenu)
Attachment #137854 - Flags: superreview?(bienvenu) → superreview+
fixed
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7alpha
Why is this a pref rather than an attribute for XUL textboxes?
it'd be great to have it as an attribute on text boxes eventually if someone
wanted to do that.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: