Widget module should emit a 'context click' event

RESOLVED WONTFIX

Status

Add-on SDK
General
P2
normal
RESOLVED WONTFIX
6 years ago
4 years ago

People

(Reporter: wbamberg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [papercuts])

(Reporter)

Description

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

6 years ago
(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.
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.
Depends on: 626326
Priority: -- → P3
Hardware: x86 → All
Target Milestone: --- → 1.0
Whiteboard: [papercuts]
(automatic reprioritization of 1.0 bugs)
Priority: P3 → P2
Target Milestone: 1.0 → 1.1
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.1 → ---

Comment 5

5 years ago
Would including middle-click event handling be within the scope of this?
Blocks: 821481

Comment 6

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

4 years ago
(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

4 years ago
(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
When Australis lands widget will be deprecated so we won't be working on this.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.