Closed
Bug 282669
Opened 20 years ago
Closed 18 years ago
First ("To:") address field not focused in new mail when last mail sent with first address field in focus
Categories
(MailNews Core :: Composition, defect)
MailNews Core
Composition
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: waynegwoods, Assigned: mscott)
References
Details
(Keywords: fixed-seamonkey1.1a, fixed1.8.1)
Attachments
(4 files, 4 obsolete files)
|
893 bytes,
patch
|
Bienvenu
:
review+
mscott
:
approval-thunderbird2+
|
Details | Diff | Splinter Review |
|
900 bytes,
patch
|
iannbugzilla
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
|
838 bytes,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
mscott
:
approval-thunderbird2+
|
Details | Diff | Splinter Review |
|
844 bytes,
patch
|
iannbugzilla
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
I've seen this bug for a while, but I never got around to testing it thoroughly
enough to report it, till now. I can't see a duplicate, but I'd be surprised if
it's never been mentioned before.
Normally when you go to compose a message, the To: field is focused automatically.
If you send a mail message (either new mail, or forward, or forward as
attachment, or whatever), and have the "To:" field focused at the time of
sending, then go to write a new mail by clicking the "Write" or "Forward"
buttons ("Forward as Attachment" from the menu works too), then you'll notice
that the To: field isn't focused.
In fact I can't see where the focus is. Habitually you go to type the recipient
address, but the text isn't going anywhere.
Nothing major, just a small glitch :)
Last tested on Thunderbird 1.0 20050217.I can confirm that this bug still exists in the released 1.5 (20051201) build. It's particularly annoying to me when I'm forwarding spam off, because I typically only write the "To" address, then hit send, then do the same thing again several times.
| Reporter | ||
Comment 2•19 years ago
|
||
Yeah, I had that problem, too, until I discovered that Spamcop could accept multiple spam attached to the one submission email :) I had a look through the code, and I can't tell why the focus is lost. When the "To:" field is focused, it calls something related to the address book, and it may be that, as the call isn't closed off again until the field is unfocused (which it never is). Just a guess.
(In reply to comment #2) > Yeah, I had that problem, too, until I discovered that Spamcop could accept > multiple spam attached to the one submission email :) Yeah, but I keep TB open, so when new spam comes in after I've recently submitted spam, boom, problem recurs again. I also was noticing it when I was doing SMTP server testing (and testing of broken behaviors on other bugs) where I was sending myself blank messages. Hopefully someone who knows more than we do will take pity on us and fix the bug! :)
| Reporter | ||
Comment 4•18 years ago
|
||
Further info... the kind of recipient that the field is set ("To", "Cc" etc.) seems to be irrelevant. It *does* matter that the focus is in the *first* address field, however. If, say, you set the first field to a "Cc" and the second field to a "To", then the bug will still only occur if the focus is in the first field, but not the second.Summary: "To:" field not focused in new mail when last mail sent with "To:" field in focus → "To:" field not focused in new mail when last mail sent with first recipient address field in focus
| Reporter | ||
Comment 5•18 years ago
|
||
Also in Mozilla Mail/News and also on Mac, so ->Core and ->All/All. See also bug 141648 that describes something like this from a few years back.
Component: General → MailNews: Composition
OS: Windows XP → All
Product: Thunderbird → Core
Hardware: PC → All
Summary: "To:" field not focused in new mail when last mail sent with first recipient address field in focus → First ("To:") address field not focused in new mail when last mail sent with first address field in focus
Version: 1.0 → Trunk
| Reporter | ||
Comment 6•18 years ago
|
||
Simple, two-line fix: In the onClose function, add a check to see if an input field is focused, and remove the focus if it is. It seems that the focus status of addressCol2#1 (the first input address field) is saved when the window closes. If a new window is opened, and it already thinks that field is focused, it fails to reset the focus for it. As a reference, see the comments and subsequent code at: http://lxr.mozilla.org/seamonkey/source/mail/components/compose/content/addressingWidgetOverlay.js#565 That's a related problem with the same fix, where the focus status was carried over when new address input fields were cloned. The exact same fix should be applicable to the equivalent SeaMonkey file, though I've not tried it. Scott, is this suitable?
| Reporter | ||
Comment 7•18 years ago
|
||
Comment on attachment 228523 [details] [diff] [review] Proposed fix Apologies if I'm not doing this right.. never submitted an actual patch before. I'm guessing by other bugs in this component that David Bienvenu is the best one to request a standard review from.
Attachment #228523 -
Flags: review?(bienvenu)
| Reporter | ||
Updated•18 years ago
|
Flags: blocking1.9a2?
Flags: blocking-thunderbird2?
Comment 8•18 years ago
|
||
Comment on attachment 228523 [details] [diff] [review] Proposed fix seems to work for me. I can check this into the trunk and consider for the branch.
Attachment #228523 -
Flags: review?(bienvenu)
Attachment #228523 -
Flags: review+
Attachment #228523 -
Flags: approval-thunderbird2?
Comment 9•18 years ago
|
||
fixed on trunk; thanks for the patch Wayne!
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 10•18 years ago
|
||
Would be useful to get a SeaMonkey version of this patch too. Was fun trying to find this bug number from the bonsai entry :-P
| Reporter | ||
Comment 11•18 years ago
|
||
The code in the SeaMonkey file is identical, so the fix should be the same. But I haven't got all the SeaMonkey code in my cvs to build and check (just the common ones, which fortunately includes the relevant file). Can anyone else check that this new patch works? If not, hopefully I can download the code tomorrow and test.
| Reporter | ||
Comment 12•18 years ago
|
||
OK, I tested the SeaMonkey version of the patch and it seems to work fine. David, is this something that can be reviewed and checked in from here, or should I open a new bug for it? BTW, thanks for the fast review! It was only 2 lines, but it was my first patch. Wheee :)
Comment 13•18 years ago
|
||
Comment on attachment 228885 [details] [diff] [review] SeaMonkey version of fix (Checked in trunk & 1.8 branch) r=me, ask bienvenu or neil@parkwaycc.co.uk for sr=
Attachment #228885 -
Flags: review+
Comment 14•18 years ago
|
||
it can be reviewed and checked in from here...
| Reporter | ||
Comment 15•18 years ago
|
||
Comment on attachment 228885 [details] [diff] [review] SeaMonkey version of fix (Checked in trunk & 1.8 branch) Thanks :) Again, this is something that could be applied to both trunk and branch. Not sure which approval request flags to set, as there doesn't seem to be a 1.9 flag, or a 1.8.
Attachment #228885 -
Flags: superreview?(bienvenu)
Updated•18 years ago
|
Attachment #228885 -
Flags: superreview?(bienvenu) → superreview+
| Assignee | ||
Updated•18 years ago
|
Attachment #228523 -
Flags: approval-thunderbird2? → approval-thunderbird2+
| Assignee | ||
Comment 16•18 years ago
|
||
not a blocker, but i approved the patch for tb2.
Flags: blocking-thunderbird2? → blocking-thunderbird2-
Comment 17•18 years ago
|
||
Comment on attachment 228885 [details] [diff] [review] SeaMonkey version of fix (Checked in trunk & 1.8 branch) a=me for SM1.1a (SM only patch)
Comment 19•18 years ago
|
||
Comment on attachment 228885 [details] [diff] [review] SeaMonkey version of fix (Checked in trunk & 1.8 branch) Checking in (trunk) MsgComposeCommands.js; new revision: 1.380; previous revision: 1.379 Checking in (1.8 branch) MsgComposeCommands.js; new revision: 1.369.2.5; previous revision: 1.369.2.4 done
Attachment #228885 -
Attachment description: SeaMonkey version of fix → SeaMonkey version of fix (Checked in trunk & 1.8 branch)
Flags: blocking1.9a2?
Keywords: fixed-seamonkey1.1a
| Reporter | ||
Comment 20•18 years ago
|
||
Thanks :)
Comment 21•18 years ago
|
||
Comment on attachment 228885 [details] [diff] [review] SeaMonkey version of fix (Checked in trunk & 1.8 branch) Note: I didn't actually verify the cause of the bug. >+ // Clear the focus >+ if (top.awInputElement.getAttribute('focused') != '') >+ top.awInputElement.removeAttribute('focused'); 1) unconditionally removing the attribute is cheaper than testing it 2) getAttribute might return null in the future like it does for HTML
| Reporter | ||
Comment 22•18 years ago
|
||
Fair enough. Since the patches are already in TB and SM, I'll just submit a couple of patches that remove the if() and correct the indent of the remaining line. Not sure what to do with them, though (r, sr etc.)
| Reporter | ||
Comment 23•18 years ago
|
||
Here's the Thunderbird one. This doesn't obsolete the previous patch, just corrects it to have no if() check.
| Reporter | ||
Comment 24•18 years ago
|
||
| Reporter | ||
Comment 25•18 years ago
|
||
Comment on attachment 229655 [details] [diff] [review] TB patch that removes the check added by the previously applied patch Small correction for Thunderbird, based on Neil's comment 21.
Attachment #229655 -
Flags: superreview?(mscott)
Attachment #229655 -
Flags: review?(bienvenu)
| Reporter | ||
Comment 26•18 years ago
|
||
Comment on attachment 229656 [details] [diff] [review] SM patch that removes the check added by the previously applied patch Small correction for SeaMonkey, based on Neil's comment 21.
Attachment #229656 -
Flags: superreview?(neil)
Attachment #229656 -
Flags: review?(iann_bugzilla)
Updated•18 years ago
|
Attachment #229656 -
Flags: superreview?(neil) → superreview+
Updated•18 years ago
|
Attachment #229655 -
Flags: review?(bienvenu) → review+
Attachment #229656 -
Flags: review?(iann_bugzilla) → review+
Comment 27•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060724 SeaMonkey/1.1a] (nightly) (W98SE) The fix seems to have caused the following regression: [ Error: top.awInputElement has no properties Source File: chrome://messenger/content/messengercompose/MsgComposeCommands.js Line: 228 ] when I send a message with Ctrl-Enter: the error seems to show up when the message has been sent and the ComposeWindow+statusDialog are removed.
Comment 28•18 years ago
|
||
I suppose an |if (top.awInputElement)| would fix it but be good to have some steps for reproducing and testing.
| Reporter | ||
Comment 29•18 years ago
|
||
Hi Serge, Where are you seeing this error? In a debug window or does something pop up automatically? I haven't been able to reproduce so far. Do you have any third party extensions or themes installed? Cheers
Comment 30•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060725 SeaMonkey/1.1a] (nightly) (W98SE) I'm using a (almost) stock nighly, and the error shows up in the Error Console. (In reply to comment #27) > when I send a message with Ctrl-Enter: Using the button too: it's not related to keyboard. > the error seems to show up when the message has been sent and the > ComposeWindow+statusDialog are removed. I confirm this. Here are steps: 1. Start MailNews 2. Display a (plain text) message (to yourself). 3. Reply to it. I get the error each time I do this in a session, until I _Compose_ a new message; after which the error doesn't show up any more ... until next session.
| Reporter | ||
Comment 31•18 years ago
|
||
Ah, I see it now. It's in Tbird too. It only seems to occur in replies, which I hadn't tested before. top.awInputElement mustn't be initialized in reply compositions. So, the question is, should it be? Or do I simply add a |if (top.awInputElement)| check?
| Reporter | ||
Comment 32•18 years ago
|
||
It looks like focusing is handled quite differently for reply mails. This new Tbird patch obsoletes the previously reviewed (but not checked in) corrective patch, and adds a check for |if (top.awInputElement)| Needs to be checked in to trunk and 1.8 branch. SeaMonkey patch to follow.
Attachment #229655 -
Attachment is obsolete: true
Attachment #230736 -
Flags: superreview?(mscott)
Attachment #230736 -
Flags: review?(bienvenu)
Attachment #230736 -
Flags: approval1.8.1?
Attachment #230736 -
Flags: approval-thunderbird2?
Attachment #229655 -
Flags: superreview?(mscott)
| Reporter | ||
Comment 33•18 years ago
|
||
SeaMonkey version of previous patch. Again, this needs to land on trunk and SM 1.1 branch. Thanks!
Attachment #229656 -
Attachment is obsolete: true
Attachment #230737 -
Flags: superreview?(neil)
Attachment #230737 -
Flags: review?(iann_bugzilla)
Updated•18 years ago
|
Attachment #230736 -
Flags: review?(bienvenu) → review+
Comment 34•18 years ago
|
||
Comment on attachment 230736 [details] [diff] [review] Corrective patch to account for when top.awInputElement is null thunderbird2 is appropriate - 1.8.1 isn't - firefox uses that.
Attachment #230736 -
Flags: approval1.8.1?
Comment 35•18 years ago
|
||
Hmm, I guess I should have paid more attention to this one :-(
Does the problem only occur when composing a brand new message?
Does the problem only occur when the previous message had exactly one address?
If either of these are true then can you please try this:
awGetInputElement(0).removeAttribute("focused");
Comment 36•18 years ago
|
||
(In reply to comment #35) > Hmm, I guess I should have paid more attention to this one :-( If you are refering to the error in comment 27 with steps in comment 30, the answers are: > Does the problem only occur when composing a brand new message? No, it's the opposite: for replies only. > Does the problem only occur when the previous message had exactly one address? I didn't test this, but, at least, it occurs for the very first reply, when there has been no previous message (written) yet.
Comment 37•18 years ago
|
||
Sorry, I was referring to the original bug, not the regression.
| Reporter | ||
Comment 38•18 years ago
|
||
(In reply to comment #35) > Does the problem only occur when composing a brand new message? It depends what you mean by brand new. The bug also occurred when composing messages that were forwards. > Does the problem only occur when the previous message had exactly one address? The previous message could have had any number of addresses added. But the first address field had to have the focus when the message was sent. > If either of these are true then can you please try this: > awGetInputElement(0).removeAttribute("focused"); I'll try that tonight.
| Reporter | ||
Comment 39•18 years ago
|
||
(In reply to comment #35) > If either of these are true then can you please try this: > awGetInputElement(0).removeAttribute("focused"); awGetInputElement(0) is null in onClose in all situations I tested, including sending fresh mail compositions and reply mails.
Comment 40•18 years ago
|
||
(In reply to comment #39) >awGetInputElement(0) is null in onClose in all situations I tested, including >sending fresh mail compositions and reply mails. My fault; can you please try awGetInputElement(1) instead?
| Reporter | ||
Comment 41•18 years ago
|
||
(In reply to comment #40) > My fault; can you please try awGetInputElement(1) instead? Yep. That works! It seems to exist in all cases. In new messages (including forwarded etc.) it's the same as top.awInputElement. In the case of replies, it's something else.
| Reporter | ||
Comment 42•18 years ago
|
||
How does this look?
Attachment #230736 -
Attachment is obsolete: true
Attachment #230736 -
Flags: superreview?(mscott)
Attachment #230736 -
Flags: approval-thunderbird2?
Comment 43•18 years ago
|
||
(In reply to comment #42) >Created an attachment (id=230891) [edit] >TB correction to use awGetInputElement(1) instead of top.awInputElement > >How does this look? Looks fine to me.
| Reporter | ||
Comment 44•18 years ago
|
||
Comment on attachment 230891 [details] [diff] [review] TB correction to use awGetInputElement(1) instead of top.awInputElement [Checkin: Comment 52] Cool, we'll go with that, then. SM patch to follow when I get a chance to confirm that it works.
Attachment #230891 -
Flags: superreview?(neil)
Attachment #230891 -
Flags: review?(bienvenu)
Updated•18 years ago
|
Attachment #230891 -
Flags: review?(bienvenu) → review+
| Reporter | ||
Updated•18 years ago
|
Attachment #230737 -
Attachment is obsolete: true
Attachment #230737 -
Flags: superreview?(neil)
Attachment #230737 -
Flags: review?(iann_bugzilla)
Comment 45•18 years ago
|
||
Comment on attachment 230891 [details] [diff] [review] TB correction to use awGetInputElement(1) instead of top.awInputElement [Checkin: Comment 52] This doesn't need my sr.
Attachment #230891 -
Flags: superreview?(neil)
| Assignee | ||
Updated•18 years ago
|
Attachment #230891 -
Flags: superreview+
Attachment #230891 -
Flags: approval-thunderbird2+
| Reporter | ||
Comment 46•18 years ago
|
||
SeaMonkey version of the same patch. Tested on trunk on Mac and works fine with both sends and replies. I can't test branch. Would need to land on both trunk and branch, however. Hopefully this is the last patch. Sorry for all the corrections.
Attachment #231079 -
Flags: superreview?(neil)
Attachment #231079 -
Flags: review?(iann_bugzilla)
Updated•18 years ago
|
Attachment #231079 -
Flags: superreview?(neil) → superreview+
Attachment #231079 -
Flags: review?(iann_bugzilla) → review+
Updated•18 years ago
|
Attachment #231079 -
Flags: approval-thunderbird2?
Updated•18 years ago
|
Whiteboard: [checkin needed (Trunk & 1.8 branch)]
Comment 47•18 years ago
|
||
Comment on attachment 231079 [details] [diff] [review] SM correction to use awGetInputElement(1) instead of top.awInputElement [Checkin: Comment 52] a=me for SM1.1a
Attachment #231079 -
Flags: approval-thunderbird2?
Comment 48•18 years ago
|
||
Wayne: Is there a reason to wait before checking in the patches ? Ian: Is your SM v1.1a approval enough, or do we need another one, or a plussed flag ?
| Reporter | ||
Comment 49•18 years ago
|
||
(In reply to comment #48) > Wayne: > Is there a reason to wait before checking in the patches ? I see no reason to wait. Thanks!
| Reporter | ||
Comment 50•18 years ago
|
||
Sorry, I have no idea how that last post happened. The patches should be right to go. Now they're approved, do I normally have to request check-in? Or does someone else take care of that? Thanks :)
Comment 51•18 years ago
|
||
*** Bug 347554 has been marked as a duplicate of this bug. ***
Comment 52•18 years ago
|
||
I've just checked the TB & SM correction patches into Trunk & Branch on behalf of Wayne.
Updated•18 years ago
|
Attachment #231079 -
Attachment description: SM correction to use awGetInputElement(1) instead of top.awInputElement → SM correction to use awGetInputElement(1) instead of top.awInputElement
[Checkin: Comment 52]
Updated•18 years ago
|
Attachment #230891 -
Attachment description: TB correction to use awGetInputElement(1) instead of top.awInputElement → TB correction to use awGetInputElement(1) instead of top.awInputElement
[Checkin: Comment 52]
Updated•18 years ago
|
Whiteboard: [checkin needed (Trunk & 1.8 branch)]
Comment 53•18 years ago
|
||
I can verify this fixes the problem, with TB 3a1-0806, Win2K. I had been hoping the solution would also fix the problem seen at bug 289339, which symptom appears under very similar conditions as the one described here; but alas, no. Wayne, maybe you could take a look at that...?
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 54•18 years ago
|
||
Thanks for the check-ins, Mark! I'm not sure about bug 289339, but if nobody gets to it first, I'll try my meagre skills on it as soon as I'm done with a couple of Fx things. :)
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•