Last Comment Bug 230563 - Can't paste bookmarks into new (empty) folders.
: Can't paste bookmarks into new (empty) folders.
Status: RESOLVED WORKSFORME
:
Product: SeaMonkey
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: Trunk
: x86 Windows 98
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 302183
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-10 06:00 PST by Mark Rodgers
Modified: 2012-06-05 14:33 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
A Patch that tries to correct the problem but instead crashes mozilla (2.49 KB, patch)
2005-07-20 06:04 PDT, Shlomi Fish
no flags Details | Diff | Review
A Working Patch that corrects the problem for Firefox. (2.45 KB, patch)
2005-07-20 15:18 PDT, Shlomi Fish
no flags Details | Diff | Review
bookmark mgr window of empty folder (9.25 KB, image/png)
2005-07-22 15:20 PDT, Wayne Mery (:wsmwk, NI for questions)
no flags Details

Description Mark Rodgers 2004-01-10 06:00:27 PST
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007

This is a comment or elaboration on a problem that has already been reported by
a number of informants.  There's a basic shortcoming with the way that pasting
of bookmarks appears to be intended to operate for the Mozilla user.  Rather
than Ctrl-V inserting the cut/copied item *before* the highlighted line in
Bookmark Manager, it would make more sense if Ctrl-V emulated the behaviour of
Netscape 4.x and inserted the cut/copied item *after* the highlighted line.

Netscape 4.x had it right in the first place as far as pasting behaviour in the
Bookmark Manager was concerned:

1. If you pasted to an open (expanded) folder, the cut/copied item was pasted
*into* that folder, as its first item.

2. If you pasted to a closed (collapsed) folder, the cut/copied item was pasted
immediately below that folder (but not into it), at the same level of nesting
within the bookmark hierarchy as that folder.

3. If you pasted to the last item in a folder, the cut/copied item got inserted
after it to become the new last item within that folder.  (You can't do that in
Mozilla with pasting, nor with keyboard shortcuts.)

4. If you pasted to the pseudo "Bookmarks for <whoever>" folder -- whether it
was open or closed -- the cut/copied item because the very first displayed bookmark.

Intuitive and consistent -- and if the pasting behaviour of Mozilla wasn't
intended to emulate that of Netscape 4.x, then it would be great if Mozilla
*did* emulate Netscape 4.x in that regard.  (Because -- disregarding Mozilla's
multiple bookmarks -- Netscape 4.x had the best bookmark manager around.)

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Asher Levy 2004-09-30 08:19:08 PDT
I agree. Keyboard pasting should be simple and intuitive.

I use 1.7.2 and notice the following behavior :
1. Pasting on a collapsed folder places the bookmark after it (OK).
2. Pasting on a open folder places the bookmark after it (BAD).
3. Pasting AGAIN on the same open folder _usually_ places the
   bookmark last in the folder (not 100%).
Sometimes the only way to get what I want is to use the mouse (drag&drop).
Comment 2 Lapo Luchini 2004-10-29 05:41:29 PDT
IMHO "paste" should paste the bookmark as the currently-selecte-dnode CHILD and
not sibling, that's all.
Comment 3 Shlomi Fish 2005-07-20 06:04:35 PDT
Created attachment 189884 [details] [diff] [review]
A Patch that tries to correct the problem but instead crashes mozilla

Hi!

I've tried to delve into the code and correct the problem. This is a patch I
wrote. However, it is faulty, and causes Mozilla to crash. Now - I don't know
why it crashes Mozilla - everything looks fine to me. Can anyone help?
Comment 4 timeless 2005-07-20 07:46:42 PDT
please provide a talkbackid
Comment 5 Shlomi Fish 2005-07-20 08:42:09 PDT
(In reply to comment #4)
> please provide a talkbackid

I would if I could get Mozilla CVS (without my patch) to compile. But at the
moment, I get a 

nsPrincipal.cpp:265: error: no `nsresult nsPrincipal::Subsumes(nsIPrincipal*,
PRBool*)' member function declared in class `nsPrincipal'
gmake[2]: *** [nsPrincipal.o] Error 1

Problem.
Comment 6 Shlomi Fish 2005-07-20 15:18:41 PDT
Created attachment 189953 [details] [diff] [review]
A Working Patch that corrects the problem for Firefox.

This is a version of the patch that does not cause the error I reported earlier
(which was not a crash - just an error, that caused the operation to be
cancelled). It seems to be working and solve the problem from what I tried.
Comment 7 Wayne Mery (:wsmwk, NI for questions) 2005-07-22 15:09:56 PDT
Shlomi, if you have tested your patch, you need to set it for someone to review.
(perhaps timeless?)

This is possibly a dup of bug 127479
Comment 8 Wayne Mery (:wsmwk, NI for questions) 2005-07-22 15:20:19 PDT
Created attachment 190186 [details]
bookmark mgr window of empty folder

does the also address the situation where an empty folder opened in bookmark
manager has all commands greyed out?  (possibly bug 116261 )

steps to reproduce:
1. create empty folder in bookmarks
2. r-click and "open in new folder" 

results
all commands greyed out as in the attachment
Comment 9 Shlomi Fish 2005-07-23 05:09:55 PDT
Comment on attachment 189953 [details] [diff] [review]
A Working Patch that corrects the problem for Firefox.

I'd like to get approval for this patch. Note that it has one small issue in
which I iterate over the remaining items to the one that I need. I added it
because I thought that it was a problem, but it turned out there was a
different problem. I'll check to see if the code works without this particular
workaround.
Comment 10 Shlomi Fish 2005-07-23 07:24:59 PDT
(In reply to comment #8) 
> Created an attachment (id=190186) [edit] 
> bookmark mgr window of empty folder 
>  
> does the also address the situation where an empty folder opened in bookmark 
> manager has all commands greyed out?  (possibly bug 116261 ) 
>  
 
No, I don't think it does. (But I did not check whether it does or does not.) 
Let's kill one cow at a time. 
 
 
Comment 11 Andrew Schultz 2005-07-24 22:16:07 PDT
Shlomif: your patch is to firefox (SeaMonkey bookmarks code lives in
mozilla/xpfe/components/bookmarks).
Comment 12 Shlomi Fish 2005-07-25 01:12:49 PDT
(In reply to comment #11)  
> Shlomif: your patch is to firefox (SeaMonkey bookmarks code lives in  
> mozilla/xpfe/components/bookmarks).  
  
Yes, I know: I was trying to fix this problem in Firefox, which is what I'm  
using. I just searched for a relevant bug report and found this one. 
Apparently, the problem exists both in Firefox and in SeaMonkey. 
Comment 13 Wayne Mery (:wsmwk, NI for questions) 2005-07-25 06:31:07 PDT
(In reply to comment #12)
> (In reply to comment #11)  
> > Shlomif: your patch is to firefox (SeaMonkey bookmarks code lives in  
> > mozilla/xpfe/components/bookmarks).  
>   
> Yes, I know: I was trying to fix this problem in Firefox, which is what I'm  
> using. I just searched for a relevant bug report and found this one. 
> Apparently, the problem exists both in Firefox and in SeaMonkey. 

Shlomif: Two FF bugs may be suitable for the fix - FF bug 250821 and Bug 250821.  

Feel free to submit a patch for seamonkey before or after.
Comment 14 Shlomi Fish 2005-07-25 10:21:42 PDT
(In reply to comment #13) 
> (In reply to comment #12) 
> > (In reply to comment #11)   
> > > Shlomif: your patch is to firefox (SeaMonkey bookmarks code lives in   
> > > mozilla/xpfe/components/bookmarks).   
> >    
> > Yes, I know: I was trying to fix this problem in Firefox, which is what 
I'm   
> > using. I just searched for a relevant bug report and found this one.  
> > Apparently, the problem exists both in Firefox and in SeaMonkey.  
>  
> Shlomif: Two FF bugs may be suitable for the fix - FF bug 250821 and Bug 
250821.   
>  
 
Wayne Mery: Hmmm... 250821 == 250821. What is the second bug number? 
 
> Feel free to submit a patch for seamonkey before or after. 
 
OK. 
Comment 15 Wayne Mery (:wsmwk, NI for questions) 2005-07-25 10:29:54 PDT
(In reply to comment #14)
> Wayne Mery: Hmmm... 250821 == 250821. What is the second bug number? 

mb I was thinking of bug 252129

BTW, email to you bounces with error due to "SPF policy"
Comment 16 Shlomi Fish 2005-07-25 11:09:12 PDT
(In reply to comment #15) 
> (In reply to comment #14) 
> > Wayne Mery: Hmmm... 250821 == 250821. What is the second bug number?  
>  
> mb I was thinking of bug 252129 
>  
> BTW, email to you bounces with error due to "SPF policy" 
 
Well, bug 250821 describes dragging and dropping into empty rather than 
pasting. This is a different thing. Bug 252129 deals with the context menu of 
the empty folder. None of them is really related to pasting. 
 
I could not find any bug similar to this one in the Firefox Bookmarks 
component, so I guess I'll open a new one. 
Comment 17 Andrew Schultz 2005-07-26 07:07:10 PDT
firefox bug tracked in bug 302183
Comment 18 Daniel Brooks [:db48x] 2005-07-27 16:46:54 PDT
Comment on attachment 189953 [details] [diff] [review]
A Working Patch that corrects the problem for Firefox.

a quick glace shows that it looks pretty good, though I'd prefer to review a
seamonkey patch :)
Comment 19 Wayne Mery (:wsmwk, NI for questions) 2006-01-03 08:35:09 PST
Comment on attachment 189953 [details] [diff] [review]
A Working Patch that corrects the problem for Firefox.

clarify patch
Comment 20 Sean 2008-01-01 17:35:28 PST
This still doesn't work in Firefox 2.0.0.11 and what's more you can't drag a bookmark into an empty folder, either. Normally I can drag a bookmark from one folder to another within the bookmarks menu, but when trying to drag into an empty folder, one is presented with a black circle with a line through it (a sort of 'no go' symbol).
Comment 21 Philip Chee 2012-06-05 14:33:14 PDT
Probably fixed by the move to Places Bookmarks.

Note You need to log in before you can comment on or make changes to this bug.