Closed Bug 701146 Opened 8 years ago Closed 8 years ago
Multi-case window id's breaks toolbar customizations
The Thunderbird team just noticed this one. Our main window has id="messengerWindow", and when doing the comparison here: http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/content/customizeToolbar.js#760 ...it appears that the window ID has been automatically lowercased, so the comparison fails, and customization is not possible. This looks like fallout from bug 662173.
This might be a bit heavy-handed, but this solution seems to work. When getting the documentId, we lowercase it before doing any operations (either getting/setting to the Event.dataTransfer object). Or is there a better way to go here?
You should only need the lowercasing for the 'contains' calls. As an aside, this] seems like an inconsistent api here. DOMStringList.contains is, presumably, case sensitive yet data transfer apis do automatic lowercase conversion.
Neil: Hrm - so there are 3 instances in that diff where I add toLowerCase where a contains is not used. Removing any combination of those 3 caused toolbar customization to break. For example, removing it from onToolbarDragStart didn't let me start the process of dragging toolbar buttons. Removing it from onToolbarDragOver didn't show me the little drop location indicator while dragging the button around, and didn't let me drop. Removing it from onPaletteDrop didn't let me drag buttons back into the toolbar palette. Thoughts?
My testing doesn't show that. I got it to work with just changing the two 'contains' lines. Note that I used Firefox with an adjusted id of 'main-windowA'
Strange. Maybe you're going about it differently than I did. Can you post your patch for me to try?
Hm, alright, so I just sync'd up with m-c/c-c, and yeah, you're right - this simplified patch works now. Thanks!
Attachment #573629 - Flags: approval-mozilla-aurora?
Component: XUL → Toolbars and Toolbar Customization
OS: Mac OS X → All
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → toolbars
Hardware: x86 → All
Checked into mozilla-inbound here: https://hg.mozilla.org/integration/mozilla-inbound/rev/0ad06b88a36b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Note to drivers: the regressing bug landed hours before the last merge and hence we couldn't fix it in time, so the approval is to fix a regression on aurora which is also keeping the Thunderbird aurora tree orange at the moment.
Attachment #573629 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Committed to mozilla-aurora as https://hg.mozilla.org/releases/mozilla-aurora/rev/81e7a0f84279
No longer blocks: 702035
Duplicate of this bug: 702035
Does this affect Firefox as well? If so, is there something QA can do to verify the fix?
> Does this affect Firefox as well? Fortunately the Firefox main window doesn't use camelcase or inicaps so isn't affected by this bug. But there is certainly some potential for extensions to trip over this. > If so, is there something QA can do to verify the fix? Er? How about testing with Thunderbird 10b?
Are there any extensions/themes/customizations which were known to have displayed this bug?
Not that I know of. But then there are over 8000 active extensions and long gone are the days when I could manually track all of the extensions on AMO.
What is the end-user manifestation of this bug? Is there something that changes in the UI? We will have to track that down in a "broken" build before verification can be done.
This bug caused dragging items to and from the toolbar during toolbar customization to not always work in Thunderbird.
Thanks Neil. Anyone verifying this fix, you will want to be sure you can reproduce this bug on a previous Thunderbird build (see comment 18).
The relevant Thunderbird bug is bug 701005. That bug states that our automated tests caught the problem on 2001/09/11 - so a nightly from around there should suffice.
I can reproduce the issue on Thunderbird Nightly from 2011-11-09 (ftp://ftp.mozilla.org/pub/thunderbird/nightly/2011/11/2011-11-09-03-00-29-comm-central/thunderbird-11.0a1.en-US.win32.installer.exe) and cannot reproduce it on Thunderbird 10b3. Dragging items during toolbar customization works fine on Firefox 10b4 on Win 7, XP, MacOS 10.7 and Ubuntu 11.10. The only strange behavior I've noticed is when clicking first time on "Restore Default Set" button on the Toolbar Customization panel, a lot of items suddenly appear at the bottom of the list.
You need to log in before you can comment on or make changes to this bug.