Closed
Bug 941372
Opened 12 years ago
Closed 12 years ago
Icons in the 'More Tools' section can get misplaced while being rearranged
Categories
(Firefox :: Toolbars and Customization, defect)
Tracking
()
RESOLVED
FIXED
Firefox 28
People
(Reporter: mjh563, Assigned: Gijs)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [Australis:P2])
Attachments
(2 files)
|
165.02 KB,
image/png
|
Details | |
|
1.44 KB,
patch
|
mikedeboer
:
review+
|
Details | Diff | Splinter Review |
Steps to Reproduce:
1. Start Firefox using a new profile.
2. Enter Customization mode.
3. If necessary, resize the window so that the 6 icons shown under "More Tools to Add to the Menu and Toolbar" are in a row of 4 followed by a row of 2.
4. The Developer icon should be the second from left in the top row. Drag it left until it's over the position of the left-most icon in that row.
Expected result:
The other icons adjust their position during the drag, but should remain in the existing rows and columns.
Actual result:
One of them half-disappears off the left of the window. See the attached screenshot.
| Assignee | ||
Updated•12 years ago
|
Blocks: australis-cust, australis-merge
Whiteboard: [Australis:P2]
| Assignee | ||
Comment 1•12 years ago
|
||
This is because we store a negative _horizontalDistance on the dragpositionmanager for the palette. There's probably just a sign invert going on (ie it should just be abs(x) where it is now x) but I should look at this again after sleeping to be sure that the code generating that variable is correct.
We're using that value because the last item doesn't have a next sibling we can use to determine how far to move it - nor does it have a previous sibling, because when you take out the devtools item, it's the first and last item in the second row. So we use a stored value to determine how far to move it. The stored value is wrong (so we move backwards instead of forwards). Because we move backwards, the code also decides to move the item down a row. That'd normally be correct, except we shouldn't be moving backwards in the first place. :-)
Thanks again for the detailed STR! Very helpful when figuring out stuff like this.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•12 years ago
|
||
Sometimes the solution is quite simple. When dragging the developer button (second item), that item becomes hidden. We then used 0 and the position of the previous item for the calculation. That, err, doesn't work very well. We should just ignore hidden items.
Attachment #8335983 -
Flags: review?(mdeboer)
Comment 3•12 years ago
|
||
Comment on attachment 8335983 [details] [diff] [review]
[Australis] ignore hidden elements for drag calculations,
Review of attachment 8335983 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm.
Attachment #8335983 -
Flags: review?(mdeboer) → review+
| Assignee | ||
Comment 4•12 years ago
|
||
Whiteboard: [Australis:P2] → [Australis:P2][fixed-in-fx-team]
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P2][fixed-in-fx-team] → [Australis:P2]
Target Milestone: --- → Firefox 28
You need to log in
before you can comment on or make changes to this bug.
Description
•