JDK-8000286 : [macosx] Views keep scrolling back to the drag position after DnD
  • Type: Backport
  • Backport of: JDK-7171812
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u4
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-10-01
  • Updated: 2012-11-28
  • Resolved: 2012-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
7u10 b12Fixed
Views and Palette keeps scrolling back to the drag position after DnD.
Reported only with 7u4 on Mac.

In NetBeans, after dragging and dropping something from Projects or Files Views or Palette in GUI designers, when you scroll the View or Palette up/down, it keeps scrolling itself back to the drag position, making it impossible to select nodes/components not visible without scrolling to them.


Debugging revealed that the scrolling is caused by java.awt.dnd.DropTarget.DropTargetAutoScroller. This class is responsible for scrolling a tree/list when something is dragged over it. For some reason the timer isn't reset when the item is dropped or the drag is aborted. Seems like JDK bug since it works fine in other JDK versions.
I've created a sample application that demonstrates the problem. The application uses AWT implementation of DND and runs fine under JDK 1.6

Pushed to the repository.

Need to backport fix for 7171812 which is safe and well tested.