diff --git a/SecRandom/Services/Security/SecuritySetupWindows.cs b/SecRandom/Services/Security/SecuritySetupWindows.cs index 767f3c84..f85edd5a 100644 --- a/SecRandom/Services/Security/SecuritySetupWindows.cs +++ b/SecRandom/Services/Security/SecuritySetupWindows.cs @@ -3,6 +3,7 @@ using Avalonia.Controls.Primitives; using Avalonia.Controls.Selection; using Avalonia.Controls.Templates; +using Avalonia.Input; using Avalonia.Input.Platform; using Avalonia.Layout; using Avalonia.Media; @@ -291,11 +292,16 @@ private static void AddUsbField( Content = content }; - private static TextBox CreatePasswordInput(string placeholderText) => new() + private static TextBox CreatePasswordInput(string placeholderText) { - PasswordChar = '●', - PlaceholderText = placeholderText - }; + var input = new TextBox + { + PasswordChar = '●', + PlaceholderText = placeholderText + }; + InputMethod.SetIsInputMethodEnabled(input, false); + return input; + } private static IImage BuildQrCode(string content) { diff --git a/SecRandom/Services/Security/SecurityVerificationWindow.cs b/SecRandom/Services/Security/SecurityVerificationWindow.cs index 9abe61ab..403cccff 100644 --- a/SecRandom/Services/Security/SecurityVerificationWindow.cs +++ b/SecRandom/Services/Security/SecurityVerificationWindow.cs @@ -4,6 +4,7 @@ using System.Windows.Input; using Avalonia; using Avalonia.Controls; +using Avalonia.Input; using Avalonia.Layout; using Avalonia.Threading; using FluentAvalonia.UI.Controls; @@ -23,6 +24,7 @@ public static async Task ShowAsync(TopLevel xamlRo PasswordChar = '●', PlaceholderText = SR.C_PasswordPlaceholder }; + InputMethod.SetIsInputMethodEnabled(password, false); var totp = new TextBox { PlaceholderText = SR.C_TotpPlaceholder, MaxLength = 6 }; var usb = new TextBlock { diff --git a/SecRandom/Views/SettingsPages/Notification/VoiceSettingsPage.axaml.cs b/SecRandom/Views/SettingsPages/Notification/VoiceSettingsPage.axaml.cs index 7c82753d..ae92c9a2 100644 --- a/SecRandom/Views/SettingsPages/Notification/VoiceSettingsPage.axaml.cs +++ b/SecRandom/Views/SettingsPages/Notification/VoiceSettingsPage.axaml.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Avalonia.Controls; using Avalonia.Controls.Templates; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; using Avalonia.Platform.Storage; @@ -836,6 +837,7 @@ private async void OpenOmniTtsProviderButton_OnClick(object? sender, RoutedEvent (option, _) => new TextBlock { Text = option.DisplayName }); var baseUrlBox = new TextBox { MinWidth = 360, Text = Settings.OmniTtsApiBaseUrl }; var apiKeyBox = new TextBox { MinWidth = 360, PasswordChar = '*' }; + InputMethod.SetIsInputMethodEnabled(apiKeyBox, false); var keyStatus = new TextBlock { Opacity = 0.7, FontSize = 12 }; void RefreshKeyStatus()