context-menu doesn't emit "click" event

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Kusanagi Kouichi, Assigned: erikvold)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 Iceweasel/18.0.2
Build ID: 20130208155452

Steps to reproduce:

const cm = require("sdk/context-menu");

cm.Item({
  label: "test",
  contentScript: 'self.on("click", function(node, data) { console.log("click"); })'
});

Run the above code and do either

activate the menu item by return key

or

1. show context-menu
2. hold left or right button
3. go to the menu item
4. release the button


Actual results:

"click" event is not emitted


Expected results:

"click" event is emitted
Just out of curiosity, did this work with older versions of the SDK?
Flags: needinfo?(slash)
(Reporter)

Comment 2

4 years ago
(In reply to Wes Kocher (:KWierso) from comment #1)
> Just out of curiosity, did this work with older versions of the SDK?

1.11 and 1.12 emit "click" event. 1.13 and 1.13.1 don't emit "click" event.
Flags: needinfo?(slash)
Blocks: 839322
Assignee: nobody → evold
Created attachment 712656 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/782

Pointer to Github pull-request
Attachment #712656 - Flags: review?(dtownsend+bugmail)
(In reply to slash from comment #2)
> (In reply to Wes Kocher (:KWierso) from comment #1)
> > Just out of curiosity, did this work with older versions of the SDK?
> 
> 1.11 and 1.12 emit "click" event. 1.13 and 1.13.1 don't emit "click" event.

Thanks for the report!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 712656 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/782

Looks good, I'll let you add the comment then merge it in.
Attachment #712656 - Flags: review?(dtownsend+bugmail) → review+

Comment 6

4 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/b691757807261ccad30854ac4462d955e58877f3
bug 839872: context-menu does not emit click event onCommand

https://github.com/mozilla/addon-sdk/commit/8a086e08abed7eab56540760d53839abb87f4deb
bug 839872: adding test comments

https://github.com/mozilla/addon-sdk/commit/54795f46db436087cee0fc1e5e91d27050b5153a
Merge pull request #782 from erikvold/839872

Fix Bug 839872: context-menu does not emit click event onCommand r=@Mossop

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 7

4 years ago
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/5e1dc2e6a2ae53bc39ad7687b880cbe01c2b1351
Merge pull request #782 from erikvold/839872

Fix Bug 839872: context-menu does not emit click event onCommand r=@Mossop(cherry picked from commit 54795f46db436087cee0fc1e5e91d27050b5153a)

Comment 8

4 years ago
Commit pushed to release at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/3abe1744231bcb29bb527404309358165712323b
Merge pull request #782 from erikvold/839872

Fix Bug 839872: context-menu does not emit click event onCommand r=@Mossop(cherry picked from commit 54795f46db436087cee0fc1e5e91d27050b5153a)
(cherry picked from commit 5e1dc2e6a2ae53bc39ad7687b880cbe01c2b1351)

Comment 9

4 years ago
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/3abe1744231bcb29bb527404309358165712323b
Merge pull request #782 from erikvold/839872
You need to log in before you can comment on or make changes to this bug.