Last Comment Bug 527924 - jetpack.menu.context.page.on("a").add() has no effect for links having HTML elements in them
: jetpack.menu.context.page.on("a").add() has no effect for links having HTML e...
Status: RESOLVED WONTFIX
:
Product: Mozilla Labs
Classification: Other
Component: Jetpack Prototype (show other bugs)
: unspecified
: All All
: P2 normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-11 08:09 PST by Frédéric Buclin
Modified: 2010-02-26 11:36 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Frédéric Buclin 2009-11-11 08:09:37 PST
Jetpack 0.6.1 on Firefox 3.5.5:

jetpack.future.import("menu");

jetpack.menu.context.page.on("a").add( function(context) ({
  label: "Link Properties",
  command: function() {
    jetpack.notifications.show( "Description: " + (context.node.title || "none") +
                                " URL: " + context.node.href );
  }
}));


This code is not triggered in the following case:

 <a href="http://www.mozilla.org" title="Mozilla"><span>Visit Mozilla website</span></a>

This link contains a <span> element, preventing Jetpack to display the item in the context menu. It should be possible to bypass this problem and let it do the right thing.
Comment 1 Drew Willcoxon :adw 2009-11-11 09:59:44 PST
This is true.  We check the node the user clicked but don't go up its parent chain.
Comment 2 Daniel Buchner [:dbuc] 2010-02-26 11:36:45 PST
We will be monitoring all these issues after the rebooted Jetpack code base is released in the first week of March to ensure their causes are not duplicated. Many of the bugs/issues with the prototype version of Jetpack will be made irrelevant given the structure of the new SDK.

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