Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - Input Connection fixes #16666

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Android - Input Connection fixes #16666

merged 3 commits into from
Aug 15, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Aug 12, 2024

What does the pull request do?

Fixes two issues;

  1. Sends default key event for ime actions Default button press no longer triggered on input submit #16655
  2. Reset composition region when text buffer is updated TextBlock unexpectedly deletes first character when using input method auto-complete #16656

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #16655

@@ -147,6 +147,26 @@ public bool PerformEditorAction([GeneratedEnum] ImeAction actionCode)
}
}

var eventTime = SystemClock.UptimeMillis();
SendKeyEvent(new KeyEvent(eventTime,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not familiar enough with the Android IME, but shouldn't this only be done for ImeAction.Done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous behavior was done for all actions. We could limit it to only actions that expect the keyboard to be dismissed.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051222-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051246-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added the bug label Aug 15, 2024
@maxkatz6 maxkatz6 merged commit 7cced30 into master Aug 15, 2024
10 of 12 checks passed
@maxkatz6 maxkatz6 deleted the android_ime_fixes branch August 15, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default button press no longer triggered on input submit
4 participants