David Mordigal
David Mordigal

Reputation: 883

NetBeans right-click context menu flickers, disappears

Has anyone else had this issue? I've looked around and couldn't find anything substantial. It looks like this has been reported to NetBeans under various circumstances, but doesn't seem to be a general problem and doesn't seem to have been fixed.

I'm using a MacBook Pro with the Force Touch trackpad (the one with haptic feedback and force click), macOS Sierra, the latest version of NetBeans, and the latest JDK. Whenever I right click on pretty much anything (a file, an object in the GUI editor, etc.), the right-click context menu flickers for a fraction of a second and then disappears. It seems to be very random; sometimes if I keep right-clicking several times in a row, the menu stays put, but the amount of times I have to do this varies quite a bit, if it even works at all.

I've been able to narrow it down to clicking the trackpad with 2 fingers vs. tapping it with 2 fingers. It seems to work fine when I tap the trackpad, but there is a brief delay in the context menu appearing, which is mildly irritating. Clicking the trackpad makes the menu appear instantly, but is what causes this to happen.

My thinking is that the IDE thinks I'm trying to scroll (same 2-finger gesture) at the same time I'm trying to right-click, which is not what I'm trying to do.

I have no idea what caused this issue to happen. I've been using this setup for weeks with no issues, and it just started happening today. Reinstalling NetBeans and even reinstalling the operating system hasn't solved it (yeah, complete waste of time).

Has anyone else encountered something like this? I'm not sure how to fix it other than by tapping the trackpad instead of clicking it, which causes a slight delay in the menu appearing.

Upvotes: 2

Views: 898

Answers (1)

jmmygoggle
jmmygoggle

Reputation: 965

I've encountered this and had resorted to using a mouse (when possible) to avoid this problem.

A related JDK bug and root cause JDK bug describe the likely cause which is a precise scrolling introduced in Sierra that caused a fast scrolling in old applications including Java. Changes to fix this in the JDK combined with later Apple Sierra fixes introduced further issues that required additional JDK changes.

A related NetBeans bug points to a tweet that indicates the actual fix should be available in JDK 8u152 when it is released.

Updating to this version or later should resolve the issue.

See also: JDK 8u152 release notes and bug fixes that indicate the root cause bug JDK-8173876 fix is present.

I've also noticed the current Oracle JDK + Netbeans bundle is only at JDK 8u151. The Netbeans.org download site doesn't specify which JDK version is bundled in its Java variants.

Upvotes: 1

Related Questions