Account Manager: S/MIME cert selection not saved if closing
Categories
(Thunderbird :: Account Manager, defect)
Tracking
(Not tracked)
People
(Reporter: KaiE, Assigned: khushil324)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
1.76 KB,
patch
|
KaiE
:
review+
|
Details | Diff | Splinter Review |
You need a configured S/MIME certificate to reproduce this bug.
Open account manager
Security tab
If certs are selected, press clear on both.
If no certs are selected, make a selection
Close the account manager tab
Restart Thunderbird
Open the account manager tab
Expected result: The last configuration change to the S/MIME certs is still active
Actual result: The last change was ignored, still shows previous state
Workaround:
Click a different account manager tab prior to closing the prefs.
Question:
Is there a JS function that we must call after the selection is made, to make the change immediately persistent?
Comment 1•4 years ago
|
||
I expect more issues like this. Aceman and I have discussed issue surrounding this at length when the AM was already in a tab in bug 1096006 for a while and there was a lot of code that made sure values were saved and consistency checks were run when switching panes in the AM, switching tabs or closing the AM tab.
Reporter | ||
Comment 2•4 years ago
|
||
There are no longer "ok/cancel" buttons for account manager prefs.
I conclude that any click/change inside account manager is supposed to be immediately persistent, right?
If yes, then all JS code in account manager that updates elements/flags needs to immediately call a save function, right?
Comment 3•4 years ago
|
||
There is a lot of fine-print to this, see the bug I mentioned.
Comment 4•4 years ago
|
||
Pinging Richard to see if he can handle it, otherwise I can take care of it as a priority early next week.
Assignee | ||
Comment 5•4 years ago
|
||
I will take this as I know the problem.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 6•4 years ago
|
||
(In reply to Khushil Mistry [:khushil324] from comment #5)
I will take this as I know the problem.
Sweet, thank you so much!
Assignee | ||
Comment 7•4 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #2)
There are no longer "ok/cancel" buttons for account manager prefs.
I conclude that any click/change inside account manager is supposed to be immediately persistent, right?
If yes, then all JS code in account manager that updates elements/flags needs to immediately call a save function, right?
We have assigned onchange/oncommand listener to all the input elements (checkbox, input, menulist, textarea, radiogroup, and richlistbox) in Account Manager Tab: https://searchfox.org/comm-central/source/mailnews/base/prefs/content/AccountManager.js#150
So we have onchange listener assigned to all the input elements in "Security" tab. But here, we are directly assigning a value to input like input.value = "xyz" through javascript which will not trigger onchange function.
To save the settings, we need to dispatch an event: window.dispatchEvent(new CustomEvent("prefchange")); which will trigger the changes globally.
So, whenever we are directly assigning value to input, we need to dispatch a "prefchange" event at the right place.
Assignee | ||
Comment 8•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 9•4 years ago
|
||
Khushil, thanks a lot, the change to mailnews/extensions/smime/content/am-smime.js works for me!
Note we don't need the change to mail/extensions/openpgp/content/ui/am-enigprefs.js - that file is currently inactive, and I'm going to remove it in bug 1603809.
Reporter | ||
Comment 10•4 years ago
|
||
The subset of Khushil's patch that we need.
Reporter | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/09cf06df9f5d
Account Manager: S/MIME cert selection not saved if closing. r=kaie DONTBUILD
Reporter | ||
Updated•4 years ago
|
Description
•