WPF should not show the touch keyboard for read-only fields
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 4.7.1+
* Windows version: (`winver`): RS1+
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
**Problem description:**
WPF uses direct calls to `InputPane.TryShow` via `TipTsfHelper` when the focused control implements the text UIA pattern, UIA is already loaded, and if the OS is >= RS1.
This means that even if the exposed `TextPattern` is marked read-only, WPF will request the KB to show.
What is actually needed is a finer grained set of conditions.
* Don't call TryShow if the `TextPattern` implementation declares it is read-only
* Don't call TryShow if the focus tracking for the touch KB does not use UIA, but uses TSF (RS3+, but this needs confirmation).
This can be mitigated in later OSes (RS3+) by setting the AppContext flag `DisableImplicitTouchKeyboardInvocation`. This stops WPF from calling `InputPane.TryShow` but the KB focus tracking and invocation will still work.
Contributor guide
Assessment
This issue has not been assessed yet.