Missing mouseUp events

I have a view (custom subclass of NSView) that overrides mouseDown: and mouseUp:. If I double-click the view, I expect to see a sequence of events:

  1. mouseDown with clickCount == 1
  2. mouseUp with clickCount == 1
  3. mouseDown with clickCount == 2
  4. mouseUp with clickCount == 2

Usually, that's what happens. But occasionally, the second or both mouse up events don't arrive. That's a problem, because it's my understanding that if you want to handle a double-click, you should be looking for the second mouse up. I am certain that the mouse location is always within the bounds of the view. What could cause this? (Testing on macOS 13.6.4.)

Added: I use a subclass of NSApplication, and override nextEventMatchingMask:untilDate:inMode:dequeue: and sendEvent:. The overrides usually just call through to the superclass method. Logging mouse events from these methods, I see that in the problematic cases, the mouse up events are received from the queue, but never sent.

In my experience mouse tracking is so broken in macOS 13, and now even more in 14. I would write yet another feedback in the Feedback Assistant app.

Thanks for the reassurance that it may not just be me. But I can't reproduce the problem in a toy project, so there's probably not much point in filing a feedback. I think I''l just hack a workaround: When I see a second-click mouse-up event in nextEventMatchingMask:untilDate:inMode:dequeue:, I'll directly dispatch it if it hits a view that responds to a custom selector doubleClick:.

Missing mouseUp events
 
 
Q