Skip to content

Commit

Permalink
[macOS] Add TODOs to remove AppKit bug workaround (#54764)
Browse files Browse the repository at this point in the history
In #40241, I added a workaround for an AppKit bug wherein mouseDown/Up events were ignored when the *Reduced Transparency* accessibility setting was enabled, and the view was hosted in an `NSPopover`.

I filed a Radar and Apple reported the bug fixed in macOS 13.3.1.

When we drop support for macOS 12 in Flutter, we should remove the workaround.

So long as nothing else has been added to these methods at that time, the method overrides themselves should be removed, so that we fall back to the default behaviour.

See: http://www.openradar.me/FB12050037
See: https://developer.apple.com/documentation/appkit/nsresponder/1535349-mouseup

Issue: flutter/flutter#154063
Issue: flutter/flutter#115015

No tests modified since this only adds a comment.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
cbracken authored Aug 25, 2024
1 parent 77fa544 commit b192a52
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ - (void)mouseDown:(NSEvent*)event {
// See: https://github.com/flutter/flutter/issues/115015
// See: http://www.openradar.me/FB12050037
// See: https://developer.apple.com/documentation/appkit/nsresponder/1524634-mousedown
//
// TODO(cbracken): https://github.com/flutter/flutter/issues/154063
// Remove this workaround when we drop support for macOS 12 (Monterey).
[self.nextResponder mouseDown:event];
}

Expand All @@ -311,6 +314,9 @@ - (void)mouseUp:(NSEvent*)event {
// See: https://github.com/flutter/flutter/issues/115015
// See: http://www.openradar.me/FB12050037
// See: https://developer.apple.com/documentation/appkit/nsresponder/1535349-mouseup
//
// TODO(cbracken): https://github.com/flutter/flutter/issues/154063
// Remove this workaround when we drop support for macOS 12 (Monterey).
[self.nextResponder mouseUp:event];
}

Expand Down

0 comments on commit b192a52

Please sign in to comment.