"Paste as Quotation" should not apply to single-line textboxes

RESOLVED FIXED

Status

()

--
minor
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: neil, Assigned: akkzilla)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
Steps to reproduce problem:
1. Copy some text to the clipboard
2. Compose a message
3. Place the cursor in the subject field
4. Edit/Paste as Quotation

Expected results: disabled menuitem

Actual results: "> " + text pasted in

As per bug 151332 textareas should still allow paste as quotation.
(Assignee)

Comment 1

15 years ago
We should probably disable paste as quotation in the single line case.

What should ctrl-middleclick do?  Nothing?  Or just a normal paste?  I guess if
it goes through command handlers, the command would be disabled so it would do
nothing (which is probably fine).
(Reporter)

Comment 2

15 years ago
The command needs to be disabled to affect the menuitem correctly.
(Reporter)

Comment 3

15 years ago
Created attachment 132956 [details] [diff] [review]
Patch for Message Compose only

This patch only affects Message Compose's Paste As Quotation, because that goes
through the command controllers and ctrl+middle-click paste does not.

This also means that nsPasteCommand should no longer handle quotations.

Comment 4

15 years ago
Comment on attachment 132956 [details] [diff] [review]
Patch for Message Compose only

I'm ok with this patch (r=brade) but I'd like akk to review the first chunk
since I'm not sure why the code was originally written that way.

Also, as Neil commented on irc, it's not clear why this paste as quotation
command is registered for single line editors; perhaps due to poor factoring of
editors?
Attachment #132956 - Flags: review?(akkzilla)
(Assignee)

Comment 5

15 years ago
Looking at the cvs history, it looks like there was no paste as quotation
command, just a paste command, and that's why the command was written like that.
 It looks like the paste as quotation command was added in cvs version 1.28, but
the "pasteQuote" stuff in the old command was never removed, so at least for a
while there were two different ways of accessing paste as quotation via commands.

The question is, does anyone still depend on using the paste command with a
"pasteQuote" string?  Is that even possible?  I'm guessing that the new command
structure has no way to call such a thing -- is that right?  If so, then the
change would be safe, and a good idea from a code cleanup standpoint.  (I
haven't tested the patch to make sure that nothing breaks.)  If anyone still
does use that, ideally, we should still take the patch, and fix the caller.

Hesitating on marking it reviewed ... can someone reassure me on whether it's
possible to call the wrong command, or does one of us need to do an lxr search?
 Pending that, the patch is fine with me.

Adding Joe just in case he has anything to say about any of this.

Comment 6

15 years ago
Comment on attachment 132956 [details] [diff] [review]
Patch for Message Compose only

Based on Akkana's research, I think she's right that the old code was just
never removed.	My scanning (via lxr) of the code base found no other uses and
Neil also did a similar search.  r=brade
Attachment #132956 - Flags: superreview?
Attachment #132956 - Flags: review?(akkzilla)
Attachment #132956 - Flags: review+
(Reporter)

Updated

15 years ago
Attachment #132956 - Flags: superreview? → superreview?(alecf)

Comment 7

15 years ago
Comment on attachment 132956 [details] [diff] [review]
Patch for Message Compose only

it really is too bad that the editor has to have a special "mail editor" mode
instead of having a bunch of specific features/modes that the mail compose
window would just turn on...

sr=alecf
Attachment #132956 - Flags: superreview?(alecf) → superreview+
(Reporter)

Comment 8

15 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.