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

Commit e17f587

Browse files
authored
Revert "[macos] Move TextInputPlugin outside of visible area (#39031)" (#39176)
This reverts commit 789a549.
1 parent 789a549 commit e17f587

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,8 @@ @implementation FlutterTextInputPlugin {
245245
}
246246

247247
- (instancetype)initWithViewController:(FlutterViewController*)viewController {
248-
// The view needs an empty frame otherwise it is visible on dark background.
249-
// https://github.com/flutter/flutter/issues/118504
250-
self = [super initWithFrame:NSZeroRect];
248+
// The view needs a non-zero frame.
249+
self = [super initWithFrame:NSMakeRect(0, 0, 1, 1)];
251250
if (self != nil) {
252251
_flutterViewController = viewController;
253252
_channel = [FlutterMethodChannel methodChannelWithName:kTextInputChannel

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,20 +1532,4 @@ - (bool)testSelectorsAreForwardedToFramework {
15321532
ASSERT_FALSE(window.firstResponder == viewController.textInputPlugin);
15331533
}
15341534

1535-
TEST(FlutterTextInputPluginTest, HasZeroSize) {
1536-
id engineMock = OCMClassMock([FlutterEngine class]);
1537-
id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger));
1538-
OCMStub( // NOLINT(google-objc-avoid-throwing-exception)
1539-
[engineMock binaryMessenger])
1540-
.andReturn(binaryMessengerMock);
1541-
FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engineMock
1542-
nibName:@""
1543-
bundle:nil];
1544-
1545-
FlutterTextInputPlugin* plugin =
1546-
[[FlutterTextInputPlugin alloc] initWithViewController:viewController];
1547-
1548-
ASSERT_TRUE(NSIsEmptyRect(plugin.frame));
1549-
}
1550-
15511535
} // namespace flutter::testing

0 commit comments

Comments
 (0)