The default bug view has changed. See this FAQ.

jetpack.menu.context.page.on("a").add() has no effect for links having HTML elements in them

RESOLVED WONTFIX

Status

Mozilla Labs
Jetpack Prototype
P2
normal
RESOLVED WONTFIX
8 years ago
7 years ago

People

(Reporter: Frédéric Buclin, Unassigned)

Tracking

Details

(Reporter)

Description

8 years ago
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

8 years ago
This is true.  We check the node the user clicked but don't go up its parent chain.
OS: Linux → All
Hardware: x86 → All

Updated

8 years ago
Priority: -- → P2
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.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.