On Thu, 20 Nov 2025 16:12:14 GMT, Andy Goryachev <[email protected]> wrote:
>> I know why. Because the `TextCell` is not managed. >> https://github.com/openjdk/jfx/blob/f87448ec156608527d77a4204e98e08052ffecd1/modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/TextCell.java#L70 >> >> Therefore, this will be set: >> https://github.com/openjdk/jfx/blob/f87448ec156608527d77a4204e98e08052ffecd1/modules/javafx.graphics/src/main/java/javafx/scene/Parent.java#L1331-L1334 >> >> Indeed, the `TextCell` will be handled as layout root, therefore not >> propagating any layout request further up. >> So the real problem is, that the `TextCell` is not managed. >> >> Otherwise the layout would be propagated to the `RichTextArea`, which can do >> the corresponding actions. So I would suggest looking into that. > > Yes, this is by design. VFlow is the component that manages the text cells. > is to take another look at the problem and how to solve it. The RTA design is that VFlow deals with the layout. It views the thing not as a collection of independent cells, but as a virtual flow - a change in one cell might require the reflow of many other parts, toggling scroll bars visibility, reshaping the selection shapes, etc. In an ideal world, the layout of text and embedded nodes would be a responsibility of the (prism) text layout, making it easier to have for example a Label with rich text. But we don't have that option, so this design uses a collection of text cells to present the visible area, managed by the VFlow. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1975#discussion_r2546743823
