Closed Bug 839814 Opened 12 years ago Closed 12 years ago

Returning undefined from a context listener in a contentScript should hide the menu

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(2 files)

From the forum, if you have this in a contentScript: self.on("context", function(node) { if (node.nodeName == "A") return true }); It should hide the menu item if not clicking on an anchor node.
Attachment #712214 - Flags: review?(dtownsend+bugmail)
Comment on attachment 712214 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/778 This breaks when a context listener returns a string to change the item's label. I have a fix for this bug already though I'm just verifying one edge case against the old behaviour before submitting.
Attachment #712214 - Flags: review?(dtownsend+bugmail) → review-
Attachment #712217 - Flags: review?(evold)
Attachment #712217 - Flags: review?(evold) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/11b766d803947adbc36e460bab5758c00c22be37 Bug 839814: Returning undefined from a context listener should hide the menu item. https://github.com/mozilla/addon-sdk/commit/f26737bba08fa80e0775ecf08d2af59b02200cec Merge pull request #779 from Mossop/bug839814 Fix Bug 839814: Returning undefined from a context listener should hide the menu item. r=@erikvold
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/22cda4b088a46f086fdfd6d8cabbf7e30605b7f3 Bug 839814: Returning undefined from a context listener should hide the menu item. (cherry picked from commit 11b766d803947adbc36e460bab5758c00c22be37)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: