Generalize HideSoftInputOnTapped on Android and iOS to support 3rd party input controls#19626
Conversation
|
Hey there @albyrock87! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
Can you add tests for this? We have some existing tests for this here. |
|
@PureWeen I think existing unit tests already cover this for the following reasons:
Therefore, the fact that I removed specific reference to
I don't see what other kind of unit test I should add given that search bar is already an example of a native control which contains a text editor. |
|
Bump! |
|
Hello, |
|
@AlexGoOn have you seen the workaround I proposed here? I will try to propose a different PR here with that strategy (which is completely different but more effective). |
|
@albyrock87, thank you very much for your contribution! Yes, we've seen the workaround, and it can definitely be used as a temporary solution by our customers. We've mentioned this technique in the following thread: The Keyboard remains visible on a click outside editors even if the ContentPage.HideSoftInputOnTapped property is enabled However, the workaround requires overriding a MauiAppCompatActivity method, but we would like to fix the issue on our side so that our customers can get a working solution in the default configuration. That's why we are hoping that this PR will be introduced in .NET. However, .NET 9 is too far away, and I'm afraid too many customers may face the issue until a new version is available. |
|
@AlexGoOn if you want to avoid that, you can probably use reflection to add that part of my workaround here: |
|
/rebase |
…rty input controls.
40ec49b to
d9a9f02
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Failing tests are unrelated |
Description of Change
Generalize recognition of text inputs in
HideSoftInputOnTappedChangedManagerso that 3rd party libraries with native handlers can leverage this new feature ofContentPageby simply adding a mapper the same wayInputViewdoes.Unfortunately
HideSoftInputOnTappedChangedManageris internal, but they can still use it via reflection.I know it's suboptimal but I didn't want to change public API.
See more at: https://supportcenter.devexpress.com/ticket/details/t1201718/the-keyboard-remains-visible-on-a-click-outside-editors-even-if-the-contentpage