NSView
A contains an NSTableView
(in an NSScrollView
), a child NSView
B, and listens to mouse events by implementing -mouseDown/Dragged/Up:
. NSView
B implements neither of these methods, so the original NSResponder
ones should forward the corresponding messages to its next responder (parent view).
When the mouse is clicked inside, dragged from NSView
B, and released over any object other than the NSTableView
, the whole dragging sequence (down/dragged/up) is sent to the parent view normally.
If, however, the mouse is released over the NSTableView
, the -mouseUp:
message is never sent to the parent view. Instead, it is stolen by the NSTableView.
This behaviour can be changed to normal by subclassing NSView
B and implementing the -mouseUp:
message so that it simply passes the event to its next responder (precisely what the original NSResponder method is supposed to do).
Observed on OSX 10.7.4/Xcode 4.4. A test project can be downloaded from here: http://www.filefactory.com/file/41ung2am0aax/n/TestDragging_zip
Is this an expected behaviour or a bug?