File Bookmark: Clicking "Use Default" doesn't work if default folder for new bookmarks is not visible (in an unexpanded folder)

RESOLVED EXPIRED

Status

SeaMonkey
Bookmarks & History
--
minor
RESOLVED EXPIRED
16 years ago
8 years ago

People

(Reporter: Tuukka Tolvanen (sp3000), Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722
BuildID:    trunk cvs 2002-07-22

Noticed while testing bug 158650... Granted, it's a slightly unlikely scenario,
but still. :)

In the "Add Bookmark" dialog (Bookmarks > File Bookmark) dialog:
Clicking "Use Default" doesn't work, if the default folder is not visible in the
tree; that is, it is in an unexpanded folder.

Reproducible: Always
Steps to Reproduce:
1. Make a bookmark folder, and a subfolder in it
2. Set the subfolder as default (bookmarks > manage bookmarks: select a folder,
view > set as new bookmarks folder)
3. bookmarks > file bookmark
4. ensure that the parent folder of the new bookmarks folder is closed
5. click on "Use Default"
6. clikc OK

Actual Results: Bookmark is filed at root.

Expected Results: Bookmark should be filed in the default folder.

http://lxr.mozilla.org/seamonkey/source/xpfe/components/bookmarks/resources/addBookmark.js#302

Comment 1

16 years ago
Confirming with 2002072204 trunk under XP.

Platform/OS -> All.
OS: Linux → All
Hardware: PC → All
(Reporter)

Comment 2

16 years ago
Created attachment 92254 [details] [diff] [review]
patch

- changes mode line to reflect reality, there's no 4-tabs anywhere in the file
- useDefaultFolder: the assignment -- gCreateInFolder = folder.Value or
"NC:BookmarksRoot" -- should depend on whether we have found a default folder,
rather than whether that folder has a visible index# !=-1 in the tree.
- The default new bm folder is not visibly selected, as I don't have a clue how
to expand the ancestors to make it visible and so forth, right now. ...but I
suppose that's more a part of bug 158650 (the selection of the folder is not
visible if it is outside the scrolled view).

r/sr/a/c, etc.
(Reporter)

Comment 3

16 years ago
->meee
Assignee: ben → t.bugz
Keywords: patch, review
(Reporter)

Updated

16 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 4

16 years ago
Created attachment 94587 [details] [diff] [review]
patch v2.0

Patch in bug 83298 fixed the issue of the wrong condition in useDefaultFolder,
but apparently broke the folder bit. Now, instead of the bookmark getting filed
at root and the dialog closing, clicking OK gets:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004003 (NS_ERROR_INVALID_POINTER) [nsIRDFService.GetResource]"  nsresult:
"0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame ::
chrome://communicator/content/bookmarks/addBookmark.js :: onOK :: line 238" 
data: no]

The old code did the GetSources - GetResource - getNext stuff in
useDefaultFolder in addBookmark.js, in bug 83298 it was moved to
BookmarksUtils.getSpecialFolder in bookmarksOverlay.js, which useDefaultFolder
now uses via BookmarksUtils.getNewBookmarkFolder. The old code did
QueryInterface(Components.interfaces.nsIRDFResource) on the [xpconnect wrapped
nsISupports] from sources.getNext(), but the patched code doesn't, so it tries
to get folder.Value from a [xpconnect wrapped nsISupports], which turns out
undefined. --> onOK()-> kRDF.GetResource("undefined", true);

This patch just slaps back the qi, and lo, it worketh.
Attachment #92254 - Attachment is obsolete: true
(Reporter)

Comment 5

16 years ago
Comment on attachment 94587 [details] [diff] [review]
patch v2.0

bah, noticed that onOK doesn't give a flying poo about what gCreateInFolder is
set to, unless a folder was never selected. Patch still fixes the exception
(comment 4), but if you click on any folder before clicking on 'Use Default'
(step 5, comment 0), the clicked folder gets used instead of default.
Attachment #94587 - Flags: needs-work+
(Reporter)

Comment 6

16 years ago
->back
Assignee: t.bugz → ben
Status: ASSIGNED → NEW
Keywords: patch, review
Mass reassign of my non-Firefox bugs to ben_seamonkey@hotmail.com
Assignee: bugs → ben_seamonkey
Product: Browser → Seamonkey
Assignee: ben_seamonkey → nobody
QA Contact: claudius → bookmarks

Comment 8

9 years ago
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
Status: NEW → UNCONFIRMED

Comment 9

8 years ago
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but still has no comment since the inception of the SeaMonkey project 5 years ago.

Because of this, we're resolving the bug as EXPIRED.

If you still can reproduce the bug on SeaMonkey 2 or otherwise think it's still valid, please REOPEN it and if it is a platform or toolkit issue, move it to the according component.

Query tag for this change: EXPIRED-20100420
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.