Last Comment Bug 634712 - Widget module should emit a 'context click' event
: Widget module should emit a 'context click' event
Status: RESOLVED WONTFIX
[papercuts]
:
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: P2 normal with 4 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 626326
Blocks: sdk/widget
  Show dependency treegraph
 
Reported: 2011-02-16 12:44 PST by Will Bamberg [:wbamberg]
Modified: 2013-11-08 11:59 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Will Bamberg [:wbamberg] 2011-02-16 12:44:18 PST
Bug 569479 talks about how there are probably 2 sorts of widgets, "simple widgets" which just display an icon and do something when the user clicks it, and "web content widgets" which have a more complex UI defined using HTML, and display the weather in Vancouver or the time in Oslo.

The idea is that:
- "web content widgets" probably use content scripts to tell the main add-on code about user interactions with the HTML they host
- because widget provides onClick, onMouseover, and so on, "simple widgets" don't need to use content scripts

But a very common pattern for a widget is to display only an icon, but to respond differently to left and right button mouse clicks: usually, left-click to enable/disable, right-click to display a settings panel or menu.

Currently the only way to do this is using a content script. If the widget API supported right-click, or more abstractly 'context click', events, then these kinds of widgets wouldn't need content scripts any more.
Comment 1 Drew Willcoxon :adw 2011-02-16 14:06:44 PST
(In reply to comment #0)
> But a very common pattern for a widget is to display only an icon, but to
> respond differently to left and right button mouse clicks: usually, left-click
> to enable/disable, right-click to display a settings panel or menu.

This would be another bug, but if we want to support widget context menus we should augment the widget API in a way that's easy to use and consistent with the current context-menu API, in addition to supporting right-click events.
Comment 2 Alexandre Poirot [:ochameau] PTO, back on 1st 2011-03-22 06:30:21 PDT
A quick note about bug 642166, that remove onClick event on right click.
But the current bug is blocked by bug 626326 that disallow any usage of right click on widgets.
Comment 3 Myk Melez [:myk] [@mykmelez] 2011-06-15 12:57:30 PDT
(automatic reprioritization of 1.0 bugs)
Comment 4 Wes Kocher (:KWierso) 2011-09-08 11:42:18 PDT
(Pushing all open bugs to the --- milestone for the new triage system)
Comment 5 Mardeg 2012-03-28 15:38:52 PDT
Would including middle-click event handling be within the scope of this?
Comment 6 antonio.bloise 2013-06-06 01:56:39 PDT
The Annotator Widget didn't respond on left- or right click events. i just did as described the tutorial. only the icon will show.
Comment 7 antonio.bloise 2013-06-06 01:58:06 PDT
(In reply to antonio.bloise from comment #6)
> The Annotator Widget didn't respond on left- or right click events. i just
> did as described the tutorial. only the icon will show.

please remove.
Comment 8 Mardeg 2013-06-06 02:04:15 PDT
(In reply to antonio.bloise from comment #6)
> The Annotator Widget didn't respond on left- or right click events. i just
> did as described the tutorial. only the icon will show.

That's bug 773297 which happens whenever the icon is moved via Customize
Comment 9 Dave Townsend [:mossop] 2013-11-08 11:59:02 PST
When Australis lands widget will be deprecated so we won't be working on this.

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