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

Suspend selection updates in TextBoxTextInputMethodClient until all changes are completed #15659

Merged
merged 1 commit into from
May 9, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented May 8, 2024

What does the pull request do?

Suspend sending selection update events from TextBoxTextInputMethodClient until all selection changes in textbox are completed for an action.

What is the current behavior?

Currently, we update selection when caret position changes by first setting the start and end in 2 properties, i.e. SelectionStart and SelectionEnd. Those 2 updates are sent to the OS as 2 selection updates. Because of that, keyboards that support advance editing will detect it as a selection in progress, and will enable the selection flag on the keyboard.

20240506-1749-19.8416805.mp4

What is the updated/expected behavior with this PR?

When selection or caret changes occur for actions handled by TextBox, the selection updates aren't sent to the input method until the action is completed and selection is done.

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

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@emmauss emmauss requested review from grokys, maxkatz6 and Gillibald May 8, 2024 14:08
@avaloniaui-bot
Copy link

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

@maxkatz6 maxkatz6 added this pull request to the merge queue May 9, 2024
@maxkatz6 maxkatz6 added bug backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch area-textprocessing labels May 9, 2024
Merged via the queue into master with commit 7da4f3b May 9, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the text_input_method_client_begin_change branch May 9, 2024 06:12
maxkatz6 pushed a commit that referenced this pull request Aug 12, 2024
@maxkatz6 maxkatz6 added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Aug 12, 2024
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.

4 participants