This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230690 - OutlineView drag-and-drop sometimes (Windows) or always (MacOS) selects spurious nodes
Summary: OutlineView drag-and-drop sometimes (Windows) or always (MacOS) selects spuri...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.3
Hardware: PC Windows 7 x64
: P3 normal with 1 vote (vote)
Assignee: Martin Entlicher
Depends on:
Reported: 2013-06-03 19:11 UTC by ebakke
Modified: 2014-04-16 17:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ebakke 2013-06-03 19:11:48 UTC
In an OutlineView showing some rows of nodes, if the user tries to drag one row to a different position (e.g. to reorder rows when the underlying nodes support it), additional rows will be selected as the mouse moves over them during the drag operation. On Windows 7 this happens about 10% of the time, whereas on MacOS, it happens 100% of the time. On Windows the bug is merely annoying, but on MacOS the bug makes OutlineView's drag-and-drop feature unusable.

To reproduce:
1) One place in the IDE where the OutlineView is used is the "Search Results" tab. While this node tree doesn't really support reordering results, the OutlineView can still be used to exhibit the bug. Open some project, right-click the project node, click "Find..." and search for something that will bring up multiple (~5 or more) results.
2) Drag the first result row a couple of rows down, holding the left mouse button down to observe the bug. If the bug does not appear, let go and try again until it does. On Windows, you may need to start dragging from the lower part of the row you're trying to drag, and the dragged mouse cursor may need to exit onto the next row within a certain time period from when the left mouse button was pressed. On MacOS, the bug happens every time, regardless of how long I wait hovering over the original row while holding down the mouse button before beginning to drag across other rows.

Because the bug appears in both Windows and MacOS, albeit more rarely on Windows, I suspect a fix that works in Windows would also fix the issue on MacOS. Because of the timing aspect when reproducing the bug in Windows, there appears to be some kind of race condition. Maybe there's some kind of "selection rectangle" concept that doesn't get properly turned off in the OutlineView.

I've tested the reproduction instructions above on MacOS with NetBeans IDE development build 201305262300, and on Windows 7 with stable NetBeans IDE 7.3. I'm also using the OutlineView component in a platform application of my own which depends on the drag-and-drop functionality to allow the user to reorder nodes (and this does not currently work at all on MacOS because of the bug).
Comment 1 ebakke 2013-10-03 02:43:38 UTC
It seems that this JDK RFE could be used to resolve this bug:

Alternatively the hack from could be applied from within OutlineView.OutlineViewOutline.
Comment 2 ebakke 2014-04-16 17:54:59 UTC
Drag-and-Drop in OutlineView is still unusable on MacOS as of NetBeans 8.0 on Java 1.8.0_20-ea. This bug is one of the few things that prevent OutlineView from being a complete replacement for BeanTreeView.