Closed
Bug 524662
Opened 15 years ago
Closed 12 years ago
Customize Headers window is prompted twice (Creating/adding customized filter header or removing it requires to click 'OK' twice)
Categories
(MailNews Core :: Filters, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 22.0
People
(Reporter: Aureliano, Assigned: aryx)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
1.36 KB,
patch
|
Details | Diff | Splinter Review | |
1.31 KB,
patch
|
Details | Diff | Splinter Review |
STR:
1. open a new saved search window using context menu on specific folder;
2. in criterias area select "customize" for open "Customize Headers" window;
3. fill "new message header" with e.g X-Bugzilla-Status and then click Add button;
4. click OK button for unload window: the window is already prompted to user.
It seems to happens also the first time that this operation is raised from a specific folder.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5pre) Gecko/20091026 Lightning/1.0pre Shredder/3.0pre ID:20091026031601
Reporter | ||
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
It also happens in Filter management (adding custom header). The window reappears twice regardless of button pressed (OK or Cancel).
Still a problem on TB11, linux.
Component: Mail Window Front End → Filters
OS: Windows XP → All
Product: Thunderbird → MailNews Core
QA Contact: front-end → filters
Hardware: x86 → All
Version: 3.0 → 1.9.1 Branch
Comment 2•13 years ago
|
||
I can reproduce this consistently on Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0:
Steps to reproduce:
1. Tools->Message Filters…. A "Message Filters" dialog appears.
2. New…. A "Filter Rules" dialog appears.
3. Subject->Customize…. A "Customize Headers" dialog appears.
4. If desired, add or remove a message header. (This step is optional.)
5. Hit OK or Cancel.
Expected behaviour:
6. The "Customize Headers" dialog should disappear, and focus should return to the "Filter Rules" dialog.
Observed behaviour:
6. The "Customize Headers" dialog reappears. This time, clicking OK or Cancel will close the dialog. The bug will no longer occur if you repeat from step 3. However, the bug will occur again if instead you hit OK or Cancel to close the "Filter Rules" dialog, and then repeat from Step 2.
For some reason, this code is executed twice in /mail/base/content/mailWidgets.xml:
<property name="parentValue">
<setter>
<![CDATA[
if (this.searchAttribute == val && val != Components.interfaces.nsMsgSearchAttrib.OtherHeader) return val;
this.searchAttribute = val;
this.refreshList(true); // don't restore the selection, since searchvalue nulls it
if (val == Components.interfaces.nsMsgSearchAttrib.OtherHeader)
{
window.openDialog('chrome://messenger/content/CustomHeaders.xul', "", 'modal,centerscreen,resizable,titlebar,chrome', null);
setTimeout(UpdateAfterCustomHeaderChange, 0); // XXX bug 212625
}
else if (val == Components.interfaces.nsMsgSearchAttrib.AgeInDays)
{
// We want "Age in Days" to default to "is less than".
this.value = Components.interfaces.nsMsgSearchOp.IsLessThan;
}
return val;
]]>
</setter>
I could not yet find out from where this is called.
Comment 4•13 years ago
|
||
Confirming bug still exists on Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
Summary: Customize Headers window is prompted twice → Customize Headers window is prompted twice (Creating/adding customized filter header or removing it requires to click 'OK' twice)
And after the customize dialog is closed, it should probably select one of the added headers (if it can be determined).
Assignee | ||
Comment 8•12 years ago
|
||
What's going on here:
The callstacks for both windows:
#0: function set_parentValue() in <chrome://messenger/content/mailWidgets.xml> line 1703
#1: function set_value() in <chrome://messenger/content/mailWidgets.xml> line 1426
#2: function onSelect() in <chrome://messenger/content/mailWidgets.xml> line 1534
#3: function oncommand() in <chrome://messenger/content/FilterEditor.xul> line 1
#0: function set_parentValue() in <chrome://messenger/content/mailWidgets.xml> line 1703
#1: function onSelect() in <chrome://messenger/content/mailWidgets.xml> line 1539
#2: function oncommand() in <chrome://messenger/content/FilterEditor.xul> line 1
onSelect sets this.value, calling its setter which does the same targets and optargets updating like onSelect, resulting in two calls to parentValue which opens the window.
Comment 9•12 years ago
|
||
Comment on attachment 721261 [details] [diff] [review]
patch, v1
Yes that makes sense. Thanks for the patch.
Could you also submit a patch for the equivalent fix in the SeaMonkey version of this code?
Attachment #721261 -
Flags: review?(kent) → review+
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Kent James (:rkent) from comment #9)
> Could you also submit a patch for the equivalent fix in the SeaMonkey
> version of this code?
Here you go. Forward the review request if necessary.
Attachment #722540 -
Flags: review?(kent)
Updated•12 years ago
|
Attachment #722540 -
Flags: review?(kent) → review?(neil)
Comment 11•12 years ago
|
||
Comment on attachment 722540 [details] [diff] [review]
patch for SeaMonkey, v1
[What's left of onSelect could probably be inlined into the caller...]
Attachment #722540 -
Flags: review?(neil) → review+
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #721261 -
Attachment is obsolete: true
Assignee | ||
Comment 13•12 years ago
|
||
Attachment #722540 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 14•12 years ago
|
||
https://hg.mozilla.org/comm-central/rev/9737e2f98425
https://hg.mozilla.org/comm-central/rev/c164453b2b01
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 22.0
Attachment #723183 -
Attachment is patch: true
You need to log in
before you can comment on or make changes to this bug.
Description
•