Closed Bug 382221 Opened 18 years ago Closed 18 years ago

Dragging bookmark on toolbar doesn't give permanent result

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
Firefox 3 alpha5

People

(Reporter: ria.klaassen, Assigned: moco)

Details

Attachments

(3 files)

Attached file bookmarks.html (deleted) —
Steps to reproduce: - Load the attached bookmarks.html - Drag a bookmark before a folder (e.g. "Minefield Start Page" before "New Folder" - Restart Firefox Result: nothing has changed
Changing severity to major, for I think this bug will frustrate users.
Severity: normal → major
Summary: Dragging bookmark on BTF doesn't give permanent result → Dragging bookmark on toolbar doesn't give permanent result
I am able to reproduce this bug with Ria's bookmarks.html and his steps. investigating nsNavBookmarks::MoveItem() and nsNavBookmarks::AdjustIndices() what we want is to swap position 1 and 2. it looks like we update the position of the moved item from 2 to 1 (which is correct), and then update the positions of all items in the personal toolbar from 1 to 2, but that ends up including the item we moved. so we end up with two items at position 2. but, we notify the UI that the item was moved properly (so the UI looks right) but on restart, when rebuilding our ui from the db, two items at position 2 give the result that Ria found.
I have seen some other dnd problems within the same folder, such as bug #381751 Given that the bug appears to be in the code that optimizes moves within the same container, this bug seems related. Hoping to fix this one for a5.
Assignee: nobody → sspitzer
Target Milestone: --- → Firefox 3 alpha5
Flags: blocking-firefox3+
Attached patch patch (deleted) — Splinter Review
we need to adjust the indices before we make the change to the item we are moving, otherwise, our we'll impact the item we are moving.
Attachment #266672 - Flags: review?(dietrich)
Comment on attachment 266672 [details] [diff] [review] patch r=me, thanks seth
Attachment #266672 - Flags: review?(dietrich) → review+
fixed. Checking in nsNavBookmarks.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavBookmarks.cpp,v <-- nsNavBookmarks.cpp new revision: 1.98; previous revision: 1.97 done note, this will help bug #381751, but I'm seeing other issues with dnd, such as us calling MoveItem() with the wrong insert index. working on that next.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
OS: Windows XP → All
Hardware: PC → All
We definitely need some tests for moveItem() to test and verify this code doesn't regress, and moving between folders, and moving within, does the right thing.
Flags: in-testsuite?
Verified in Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a7pre) Gecko/200707270404 Minefield/3.0a7pre. Folders stick in their new positions.
Status: RESOLVED → VERIFIED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: