Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b192a52

Browse files
authored
[macOS] Add TODOs to remove AppKit bug workaround (#54764)
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
1 parent 77fa544 commit b192a52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shell/platform/darwin/macos/framework/Source/FlutterViewController.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ - (void)mouseDown:(NSEvent*)event {
297297
// See: https://github.com/flutter/flutter/issues/115015
298298
// See: http://www.openradar.me/FB12050037
299299
// See: https://developer.apple.com/documentation/appkit/nsresponder/1524634-mousedown
300+
//
301+
// TODO(cbracken): https://github.com/flutter/flutter/issues/154063
302+
// Remove this workaround when we drop support for macOS 12 (Monterey).
300303
[self.nextResponder mouseDown:event];
301304
}
302305

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

0 commit comments

Comments
 (0)