Fennec 1.1 now supports context menus. Using a long tap (aka tap-n-hold), or right-click on desktop versions, you can get a context menu to appear.
We intentional designed the context menu system to be simple and minimalistic. We do not want large context menus with many, many commands. Currently, context menus are only displayed if the user long-taps on a link or an image. Technically, not all links will activate the context menu. javascript:
links, for example will not activate the context menu.
Fennec 1.1 will only ship with two context menu commands: Open Link in New Tab and Save Image.
Add-ons can extend the context menu. Just overlay the context menu list of commands, which is
in the XUL. Each command must have a type
attribute and only 3 types are recognized: link, image, mailto.
The context menu system will automatically show/hide commands based on where the user long-taps. Under normal circumstances, the add-on will not need to worry about showing or hiding the context menu command:
- If an image is tapped, only
type="image"
commands will be shown. - If the element is an image inside a link, both types of commands will be shown.
- If no link or image is picked, no context menu will be shown at all.
Yes, this is a bit restrictive, but that’s the way we want context menus to work for now. Feedback is always appreciated and Mozilla IRC (#mobile channel) is available to help answer questions.
2 Replies to “Fennec 1.1 Context Menus”
Comments are closed.