mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
Fixing all (I think) drag and drop issues between the content area, the personal toolbar, and the bookmarks panel/manager. Includes the inability to drag a bookmark with no name, many links dragged to the bookmarks panel not having a title (79600), and bookmarks dragged to personal toolbar having names like "NC:BookmarksRoot" (85328). r=kerz sr=ben
This commit is contained in:
parent
5271ea244d
commit
198236ff7d
@ -129,7 +129,17 @@ var personalToolbarObserver = {
|
||||
var linkCharset = aDragSession.sourceDocument ? aDragSession.sourceDocument.characterSet : null;
|
||||
// determine title of link
|
||||
var linkTitle;
|
||||
if (xferData.length >= 2)
|
||||
|
||||
// look it up in bookmarks
|
||||
var bookmarksDS = gRDFService.GetDataSource("rdf:bookmarks");
|
||||
var nameRes = RDFUtils.getResource(NC_RDF("Name"));
|
||||
var nameFromBookmarks = bookmarksDS.GetTarget(elementRes, nameRes, true);
|
||||
if (nameFromBookmarks)
|
||||
nameFromBookmarks = nameFromBookmarks.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
if (nameFromBookmarks) {
|
||||
linkTitle = nameFromBookmarks.Value;
|
||||
}
|
||||
else if (xferData.length >= 2)
|
||||
linkTitle = xferData[1]
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user