JDK-8366201 : RichTextArea: remove allowUndo parameter
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx24
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-08-26
  • Updated: 2025-10-29
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
CSR :  
Relates :  
Relates :  
Description
User feedback (see https://mail.openjdk.org/pipermail/openjfx-discuss/2025-August/000267.html ):
The methods applyStyle and setStyle in RichTextArea should have a boolean undo parameter like replaceText.

Upon further analysis, the 'allowUndo' parameter was a mistake: allowing the application code to disable creating undo/redo entries messes up the internal undo/redo stack.
There is an internal need (UndoableChange), but it should not be exposed via public API.

Whenever the application needs to disable undo/redo functionality (while, for example, building a document from multiple segments), this can be accomplished by calling clearUndoRedo().

One possible issue is the maximum size of the undo/redo stack - currently it is unlimited - but in practice we should probably limit the depth to maybe 100-200 entries (see JDK-8370447  )
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1941 Date: 2025-10-20 23:04:17 +0000
21-10-2025