JDK-8090623 : TextArea context menu should be set as contextMenu property
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 7u6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2012-07-04
  • Updated: 2018-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
TextArea contains context menu. I'd expect it to be available through contextMenu property so it is possible to customize its items. However, the property is null if not set and the following weird double menus appear if you set your own context menu.

        TextArea textArea = new TextArea();
        textArea.setContextMenu(contextMenu);
Comments
This problem also affects, for example, TextFieldListCell. If a context menu is set on the TextFieldListCell it displays correctly when in non-editing mode but when the cell is in editing mode right clicking on the text field brings up both context menus. Left clicking in the text field seems to dismiss the top context menu so the users can still access the cut + paste menu.
14-06-2013

Thank you for the link.
09-10-2012

A user asked a related question on forums about how to style this default contextMenu (which is currently not possible without overriding the default skin I think): https://forums.oracle.com/forums/thread.jspa?threadID=2449176
08-10-2012

A separate issue RT-24823 was created for the double menu bug. This will be fixed for FX 8.0 The default context menu is created by the control's skin, which is currently not public API. We need to decide if and when the context menu should be accessible through the public API, but it will probably need to wait for the broader work to make skins more public.
07-09-2012