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

[Bug] Windows touch keyboard not showing after being shown in credentials popup #4975

Open
superwilly1 opened this issue Oct 23, 2024 · 1 comment
Labels
needs attention Delete label after triage public-client tracked-ado untriaged Do not delete. Needed for Automation

Comments

@superwilly1
Copy link

superwilly1 commented Oct 23, 2024

Library version used

4.66.1

.NET version

MAUI .Net 8.0.92

Scenario

PublicClient - desktop app, PublicClient - mobile app

Is this a new or an existing app?

The app is in production, and I have upgraded to a new version of MSAL

Issue description and reproduction steps

In our MAUI app, on Windows we have an issue that we think is related to the Microsoft.Identity.Client packages.
The issue is that the touch keyboard does not work anymore in the app (it is never shown again), if it has been used in the credentials popup.
Normally by selecting an input field, the touch keyboard is shown automatically.
This works, but it stops working from the moment a credentials popup is shown and the user edits some value (with the touch keyboard) in there.
As soon as that popup is closed, and the app regains focus, the touch keyboard is never shown again during that app session.
The app needs to be closed and restarted for the touch keyboard to start working again.

See the video, first I select the entry which shows the windows touch keyboard.
Then I click the button, triggering the popup credential.
I close the popup without entering anything.
Select the entry, the touch keyboard is shown.
Click the button again to trigger the popup.
Now clicking an input field on the popup to trigger the touch keyboard.
Close the popup.
Select the entry, the touch keyboard is NOT shown, and never will show again during this app session.

TouchKeyboardIssue.mp4

Relevant code snippets

// create a random AuthenticationClientId, and indicate that the EmbeddedBrowser should be used.
string AuthenticationClientId = Guid.NewGuid().ToString();
_publicClientApplication = PublicClientApplicationBuilder
    .Create(AuthenticationClientId)
    .WithRedirectUri($"msal{AuthenticationClientId}://auth")
    .WithWindowsEmbeddedBrowserSupport()
    .Build();

// trigger the popup for the user to enter their credentials, catch and ignore any exception
try
{
    await _publicClientApplication.AcquireTokenInteractive(["test"]).WithUseEmbeddedWebView(true).ExecuteAsync();
}
catch { }

Expected behavior

When the app regains focus after the credentials popup has been shown (where the touch keyboard has been shown), the touch keyboard should continue to work in the app when an input field is selected.

Identity provider

Other

Regression

No response

Solution and workarounds

No workaround found so far.
Need to close and restart the app for the touch keyboard to be available again in the app.
This is already an existing issue, as far as we know this never worked correctly.
See the attached zip file for a sample project to reproduce this issue (an empty new .NET MAUI project with a simple call to the MSAL library to trigger the credentials popup embedded webview).
MauiWinUITouchKeyboardIssue.zip

@superwilly1 superwilly1 added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Oct 23, 2024
@iulico-1
Copy link
Contributor

@superwilly1, did you enable Broker in your app by any chance ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention Delete label after triage public-client tracked-ado untriaged Do not delete. Needed for Automation
Projects
None yet
Development

No branches or pull requests

2 participants