Closed Bug 460666 Opened 16 years ago Closed 16 years ago

Drag & drop a bookmark to a specific place in a folder in Bookmarks Toolbar doubles it as last item

Categories

(Firefox :: Bookmarks & History, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3.1b2

People

(Reporter: ourasi, Assigned: asaf)

References

Details

(Keywords: regression, verified1.9.1, Whiteboard: issue has been fixed in bug 225680)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081019 Minefield/3.1b2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081019 Minefield/3.1b2pre

When trying to place a bookmark from location bar with drag & drop bookmark in a folder in Bookmarks Toolbar it will be placed in two places, the wanted place and last item.


Reproducible: Always

Steps to Reproduce:
1. Make a folder in Bookmarks Toolbar
2. Drag & drop URL from Location Bar and try to place it somewhere in the folder
3. 
Actual Results:  
Bookmark appears two times: in the wanted place and as last item in the folder

Expected Results:  
Should appear only in the wanted place
Summary: Drag & drop a bookmark to a specifig place in a folder in Bookmarks Toolbar doubles it as last item → Drag & drop a bookmark to a specific place in a folder in Bookmarks Toolbar doubles it as last item
Confirmed on XP - change platform?
OS: Linux → All
This is a regression from Bug 458233.
Blocks: 458233
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Hardware: PC → All
Version: unspecified → Trunk
Flags: blocking-firefox3.1?
Yes, this should be fixed on 3.1 -> blocking+.
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Priority: -- → P2
Target Milestone: --- → Firefox 3.1b2
feels like the drop is served by both the toolbar and the submenus handlers, checkForMenuEvent has been removed in bug 458233, and the menu view is still using dragdrop, while the toolbar uses drop, i see the drop called by both dragdrop and drop events. Updating the menu view to the new api should solve the issue.
Assignee: nobody → mano
imho we could add an event.stopPropagation() in new dragstart, dragover and drop events in the menu view, they are already served and there should be no need to propagate down to the toolbar view... that would also make the dragstart parentNode check in toolbar.xml useless.
mano, are you going to be able to work on this before freeze, or can i reassign it, or push it?
I'll try to get this done before the freeze.
retargeting
Target Milestone: Firefox 3.1b2 → Firefox 3.1
Now bookmark is placed to two places:

1. to wanted place in folder
2. as next item in Bookmarks Toolbar

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081110 Minefield/3.1b2pre - Build ID: 20081110212816
The following WORKAROUND patch works fine.

places\toolbar.xml
      <handler event="drop"><![CDATA[
+        //xxx bug 460666, To prevent duplicate bookmark when a link dropped on a folder.
+        event.stopPropagation();
+
+        //xxx bug 464242, To privent move wrong position when a bookmark dropped within own folder.
+        var target = event.originalTarget;
+        while(target){
+          if(target.localName == 'menupopup'){
+            return;
+          }
+          target = target.parentNode;
+        }
+
        // Cache the dataTransfer
        PlacesControllerDragHelper.currentDataTransfer = event.dataTransfer;

        var dropPoint = this._getDropPoint(event);
        if (!dropPoint)
          return;
        PlacesControllerDragHelper.onDrop(dropPoint.ip);
      ]]></handler>
original bug should be gone with tab detach fixes in bug 225680.

What is left is cleaning up the view to finally use only the new api.
Confirming this appears fixed in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081119 Minefield/3.1b2pre ID:20081119072659
Whiteboard: original issue is fixed, missing drag&drop api cleanup on menu.xml
Assignee: mano → mak77
i'm marking this fixed with bug 225680. If any part of places changes from that bug are going to be backed out (don't do that!) we will need to reopen this.

I'll file a separate bug for the view update
Assignee: mak77 → mano
Status: NEW → RESOLVED
Closed: 16 years ago
Depends on: 225680
Resolution: --- → FIXED
Whiteboard: original issue is fixed, missing drag&drop api cleanup on menu.xml → issue has been fixed in bug 225680
i filed bug 469703 for the view cleanup
Keywords: fixed1.9.1
Target Milestone: Firefox 3.1 → Firefox 3.1b2
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090127 Shiretoko/3.1b3pre
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.