On Mon, 17 Aug 2026 15:27:41 GMT, Ambarish Rapte <[email protected]> wrote:
>> You are right. >> This is my approach to fix the issue by calling the >> ``updateDisplayedText()`` regardless of the value of ``ignoreText``. >> Otherwise, the ``containsMnemonic`` value may be stale. >> >> I added additional tests to check combinations >> ``ContentDisplay.GRAPHIC_ONLY`` and ``ContentDisplay.TEXT_ONLY`` with empty >> and null text. > > When `ContentDisplay.GRAPHIC_ONLY` is true, and text is **non-empty**: > Calling `updateDisplayedText()` may result in invoking `addMnemonic();` and > `getChildren().add(mnemonic_underscore);`. [ refer the method > `updateDisplayedText()` , unable to share links due to Github outage ] > This can result in addition of an un-required node to scenegraph. > > The proposed change fixes the exception, but it seems to be introducing a > regression. Perhaps another option would be to reset the `containsMnemonic` flag in the `if (ignoreText)` block rather than calling `updateDisplayedText`? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2253#discussion_r3797291568
