Skip to content

Commit

Permalink
8331319: IME Window breaks after popup menu
Browse files Browse the repository at this point in the history
Reviewed-by: kcr, angorya
  • Loading branch information
Martin Fox committed Apr 30, 2024
1 parent 7294849 commit cac81b5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,12 @@ - (void)finishInputMethodComposition
{
IMLOG("finishInputMethodComposition called");
[self unmarkText];
[self.inputContext discardMarkedText];
// If we call discardMarkedText on an input context that is not
// the current one the IM will get into a persistent state where
// it will not call setMarkedText or firstRectForCharacterRange.
if (self.inputContext == NSTextInputContext.currentInputContext) {
[self.inputContext discardMarkedText];
}
}

/*
Expand Down

1 comment on commit cac81b5

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.