Closed
Bug 282645
Opened 20 years ago
Closed 20 years ago
address autocomplete doesn't work for replies (but works for new compose)
Categories
(Thunderbird :: Message Compose Window, defect)
Thunderbird
Message Compose Window
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird1.1
People
(Reporter: sspitzer, Assigned: mscott)
References
Details
(Keywords: regression)
Attachments
(3 files, 1 obsolete file)
|
2.10 KB,
patch
|
bryner
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
|
3.79 KB,
patch
|
neil
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
|
3.27 KB,
patch
|
bryner
:
review-
bzbarsky
:
superreview-
|
Details | Diff | Splinter Review |
address autocomplete doesn't work for replies (but works for new compose) I'm using a trunk tbird build from ftp.mozilla.org, "version 0.6+ (20050217)" on win xp. I'm pretty sure this is a recent regression.
| Assignee | ||
Comment 1•20 years ago
|
||
i see this too... neil tells me seamonkey works fine.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
| Assignee | ||
Comment 2•20 years ago
|
||
the first autocomplete row for a reply works fine. It's all the subsequent rows that have a dead widget
Keywords: regression
Version: 1.0 → Trunk
| Reporter | ||
Comment 3•20 years ago
|
||
fwiw, I see this on my mac mozilla tbird build, too.
OS: Windows XP → All
Hardware: PC → All
Comment 4•20 years ago
|
||
I am seeing this in Seamonkey on XP( : Mozilla 1.8b2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050220), and I concur - the first address line works fine, but all subsequent addresses fail. I wonder if this is related to the bug where you lose auto-complete after scrolling the address list? If possible, please up the severity as this is a pretty high-profile bug.
Comment 5•20 years ago
|
||
FWIW, autocomplete works fine on both new email compositions and forwards.
| Assignee | ||
Comment 6•20 years ago
|
||
Keeping Neil in the loop on this issue too as seamonkey's autocomplete widget is also experiencing the problem.
| Assignee | ||
Comment 7•20 years ago
|
||
it's interesting..only rows 2, 3 and 4 are dead for autocomplete on a reply. The first row autocompletes and rows 5 and above also autocomplete correctly.
| Assignee | ||
Comment 8•20 years ago
|
||
It looks like autocomplete rows created by awAppendNewRow are still working. But autocomplete rows created by awCreateOrRemoveDummyRows which trys to add a widget for every visible row in the envelope aren't working anymore.
| Assignee | ||
Comment 9•20 years ago
|
||
ignore my last comment.
| Assignee | ||
Comment 10•20 years ago
|
||
The problem is happening here: http://lxr.mozilla.org/mozilla/source/mailnews/compose/resources/content/addressingWidgetOverlay.js#542 If we have an existing dummy row and we are calling listbox.replaceChild then we end up with a dead auto complete instance. If we call listbox.appendChild, then we end up with an autocomplete instance which behaves correctly.
| Assignee | ||
Comment 11•20 years ago
|
||
Backing out Bug #272002 makes the mail autocomplete widget start working again.
Comment 12•20 years ago
|
||
If that patch really caused the bug, maybe this will fix it.
| Assignee | ||
Comment 13•20 years ago
|
||
Comment on attachment 175332 [details] [diff] [review] Improve on bug 272002 Hey Brian, this patch by Neil fixes mail autocomplete which was broken by the changes to nsTextControlFrame in Bug #272002
Attachment #175332 -
Flags: superreview?(bryner)
Comment 14•20 years ago
|
||
(In reply to comment #13) > (From update of attachment 175332 [details] [diff] [review] [edit]) > Hey Brian, this patch by Neil fixes mail autocomplete which was broken by the > changes to nsTextControlFrame in Bug #272002 > I don't really understand how this helps. How is it that the text frame never gets an initial reflow? Or is the NS_FRAME_FIRST_REFLOW check bogus, or is it that the box code does not propagate this state through to non-box frames?
Could there be notifications that need to get through before the first reflow?
Comment 16•20 years ago
|
||
Hmm... So what could be happening here is the following:
1) We get into the nsTextControlFrame::SetValue _before_ we saw a first reflow
2) We store our old mNotifyOnInput value (false).
3) We set mNotifyOnInput to false.
4) We set the value on the editor. Editor synchronously flushes out reflows
and paints (see bug 259636). This does our initial reflow and sets
mNotifyOnInput to true.
5) We unwind and restore the old mNotifyOnInput state (false).
6) We never have an initial reflow again, so the state stays false.
I'd forgotten about step 4, since I'm used to the way the code looks in my tree. :(
Does the patch in bug 272002 keep us from firing oninput for the initial setting
of the value? If so, I suspect that Neil's patch is the right way to go.
Comment 17•20 years ago
|
||
Yeah, the steps Boris gave seem to be what's happening, in the case where an input is inserted into the document dynamically. One thing that concerns me about the patch is that it basically gets rid of whatever the original intent of mNotifyOnInput was. What do you think about this instead; when restoring mNotifyOnInput from oldNotify, do: mNotifyOnInput |= oldNotify; That will handle the case where the editor insertion enables notifications.
Comment 18•20 years ago
|
||
That could work, as long as we never reenter SetValue. But again, I suspect the initial purpose of mNotifyOnInput was to not fire oninput handlers when setting the default value of the input (at frame init time). Or something like that. The checkin comment says it was for bug 42045 and bug 42675, neither of which has useful information on why the check was put in place...
Comment 19•20 years ago
|
||
How would reentering SetValue cause that not to work?
Comment 20•20 years ago
|
||
I guess you're thinking of the case where a nested call to SetValue causes oninput notiifcation to be unsuppressed for the outer call?
Comment 21•20 years ago
|
||
Right.
Comment 22•20 years ago
|
||
Yet another possibility here would be to put the editor into async update mode from SetValue(). (InitEditor() does this). This would prevent the synchronous reflow condition that's causing us to clobber mNotifyOnInput. I can't think of any real drawbacks to this.
Comment 23•20 years ago
|
||
See bug 259636 for exactly that proposal, along with kin's listing of the drawbacks...
| Assignee | ||
Comment 24•20 years ago
|
||
guys, I'm hearing lots of great debate here on how you want to fix it which is great. But I'd really like to get this regression fixed ASAP. It really makes mail composition extremely hard to use right now. Can we back out the bug that caused this until everyone agrees on the right way to fix it or have we reached consensus and can fix it ASAP? Thanks!
Comment 25•20 years ago
|
||
This patch makes it so that we don't unsuppress oninput notifications until we've fully unwound from processing transactions. I tested the mail compose autocomplete case and the firefox username autocomplete that was the original problem, and both seem to work.
Attachment #175770 -
Flags: superreview?(bzbarsky)
Attachment #175770 -
Flags: review?(bzbarsky)
Comment 26•20 years ago
|
||
Comment on attachment 175770 [details] [diff] [review] proposed solution This is ok, but I do think that Neil's proposal is cleaner, and should work as well....
Attachment #175770 -
Flags: superreview?(bzbarsky)
Attachment #175770 -
Flags: superreview+
Attachment #175770 -
Flags: review?(bzbarsky)
Attachment #175770 -
Flags: review+
Comment 27•20 years ago
|
||
FYI my patch has the added advantage of fixing bug 276882.
Comment 28•20 years ago
|
||
Comment on attachment 175770 [details] [diff] [review] proposed solution Yeah... let's use Neil's patch instead. As long as we supress oninput for all scripted editor transactions, it shouldn't be possible to fire oninput until we've had a reflow, because the user won't be able to interact with the editor.
Attachment #175770 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #175332 -
Flags: superreview?(bryner)
Attachment #175332 -
Flags: superreview+
Attachment #175332 -
Flags: review+
Comment 29•20 years ago
|
||
(In reply to comment #26) > (From update of attachment 175770 [details] [diff] [review] [edit]) > This is ok, but I do think that Neil's proposal is cleaner, and should work as > well.... > Though doesn't this patch also have the problem where a reentrant call to SetValue could set mNotifyOnInput = PR_TRUE before the outer call completes?
Comment 30•20 years ago
|
||
Yes, it does (should be simpler to fix the issue there, though).
Comment 31•20 years ago
|
||
Attachment #175796 -
Flags: superreview?(bzbarsky)
Attachment #175796 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 32•20 years ago
|
||
Personally I can't actually figure out what we're protecting against; surely suppressing the oninput should prevent a recursive notification? Is there any mileage in using PRUint8 mSuppressInput?
Attachment #175805 -
Flags: superreview?(bzbarsky)
Attachment #175805 -
Flags: review?(bryner)
Comment 33•20 years ago
|
||
Comment on attachment 175796 [details] [diff] [review] neil's patch w/ recursion protection sr=bzbarsky. I think I prefer this to adding several extra bytes to every textframe... As for how this could happen, editor listeners (attached by someone with sufficient privileges) could catch the change even in the absence of an input event....
Attachment #175796 -
Flags: superreview?(bzbarsky) → superreview+
Comment 34•20 years ago
|
||
(In reply to comment #32) > Created an attachment (id=175805) [edit] > Even simpler recursion protection? > > Personally I can't actually figure out what we're protecting against; surely > suppressing the oninput should prevent a recursive notification? > > Is there any mileage in using PRUint8 mSuppressInput? This patch will add 4 bytes per TextControlFrame, which I'd like to avoid.
Comment 35•20 years ago
|
||
Comment on attachment 175805 [details] [diff] [review] Even simpler recursion protection? minusing per above comment
Attachment #175805 -
Flags: review?(bryner) → review-
| Assignee | ||
Comment 36•20 years ago
|
||
I see the latest patch for this regression fix got minused. Brian, maybe we should be looking at backing out the change that broke autocomplete if we think fixing the regression is going to take more time to figure out the right thing. This is a pretty serious mail regression that's been broken since the 15th of February. I think we've been pretty patient but we really need to get this figured out one way or the other.
Comment 37•20 years ago
|
||
Comment on attachment 175796 [details] [diff] [review] neil's patch w/ recursion protection It looks as if mInTransaction == !mNotifyOnInput; if you agree then please make the necessary optimization.
Attachment #175796 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Comment 38•20 years ago
|
||
checked in attachment 175796 [details] [diff] [review] with the optimization neil suggested
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 39•20 years ago
|
||
*** Bug 284720 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Attachment #175805 -
Flags: superreview?(bzbarsky) → superreview-
Comment 40•20 years ago
|
||
*** Bug 285599 has been marked as a duplicate of this bug. ***
Comment 41•20 years ago
|
||
*** Bug 285716 has been marked as a duplicate of this bug. ***
Comment 42•20 years ago
|
||
*** Bug 286092 has been marked as a duplicate of this bug. ***
Comment 43•20 years ago
|
||
*** Bug 286880 has been marked as a duplicate of this bug. ***
Comment 44•20 years ago
|
||
*** Bug 287419 has been marked as a duplicate of this bug. ***
Comment 45•20 years ago
|
||
*** Bug 290942 has been marked as a duplicate of this bug. ***
Comment 46•20 years ago
|
||
*** Bug 291298 has been marked as a duplicate of this bug. ***
Comment 47•19 years ago
|
||
*** Bug 318211 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•