netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Javadoc rendering issue with JDK API docs and code sections

Open nmatt opened this issue 2 months ago • 1 comments

Apache NetBeans version

Apache NetBeans 27

What happened

Recent versions of the JDK API docs have been adding "Copy" buttons for code sections, like for example here: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Class.html#newInstance%28%29

These are rendered by NetBeans in a way that overlaps with preceding text, making it unreadable.

Example screenshot (red ellipses highlight the issue): Image

Language / Project Type / NetBeans Component

Java

How to reproduce

Invoke the javadoc window (e.g. Ctrl+Space) on an invocation of Class.getInstance() (for example).

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

nmatt avatar Oct 27 '25 21:10 nmatt

Thanks for the report.

I'm not sure I see overlap, but the formatting looks odd. This seems to be an intended change introduced via #3498 #3884 and #3937 but it could probably do with some tweaking.

neilcsmith-net avatar Oct 31 '25 14:10 neilcsmith-net