Closed
Bug 33675
Opened 25 years ago
Closed 25 years ago
[feature] Need a way to hook up context menus for XUL text inputs
Categories
(Core :: XBL, defect, P2)
Core
XBL
Tracking
()
RESOLVED
FIXED
M16
People
(Reporter: sfraser_bugs, Assigned: danm.moz)
References
Details
We need to be able to hook up context menus for XUL text widgets, in a way that
is friendly to embedders.
Comment 1•25 years ago
|
||
Yes please. Not being able to use context menus in XUL inputs would be a big
bummer, IMO.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → M17
Updated•25 years ago
|
OS: Mac System 8.5 → All
Comment 4•25 years ago
|
||
Apps folks need this in M16, retargetting, setting priority p2
Priority: P3 → P2
Target Milestone: M18 → M16
Reporter | ||
Comment 5•25 years ago
|
||
A related bug to this is bug 33967, that we need to be able to set the selection
in XUL text widgets from JavaScript. It's related because it's another "messing
with XUL text widgets from JS" kind of thing.
Updated•25 years ago
|
Summary: Need a way to hook up context menus for XUL text inputs → [feature] Need a way to hook up context menus for XUL text inputs
Whiteboard: 1 day, 4/26
Comment 6•25 years ago
|
||
reassigning to danm to load-balance.
Assignee: hyatt → danm
Status: ASSIGNED → NEW
.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: 4/28 fer sure
Reporter | ||
Comment 8•25 years ago
|
||
So, dan, how do I go about hooking up a context menu to a XUL text input?
OK. Instructions. It'd be nice if we had docs, wouldn't it?
You've "always" been able to add popups to a specific text field in the xul,
using a <popupset> element with an id. You wanted to be able to do it in XBL; a
place where the id requirement gets in the way. All we've added is the ability to
specify a popup with a magic keyword in place of the id.
You can now add a popup to all text fields by editing the textfield's bindings:
<binding id="textfield" ...>
<content ...>
<xul:box ... context="_child">
...
<xul:popupset>
<xul:popup>
<xul:menuitem value="Cut" oncommand=.../>
</xul:popup>
</xul:popupset>
</xul:box>
...
The new trick is the context="_child" attribute, which makes it attach the first
popupset child that it sees, disregarding its id.
Note that this works with everything (as far as I know) except context clicks on
edit fields -- the exact thing you wanted. See bug 37950.
Comment 10•25 years ago
|
||
Are these instructions available off of mozilla.org/xpfe, not just in the bug?
You need to log in
before you can comment on or make changes to this bug.
Description
•