1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-21 02:33:36 +00:00

[PS-1009] Changed keyboard on Passphrase generator to not allow emojis (#2038)

* PS-1009 Added effect to Entry that doesn't allow keyboard with emojis on passphrase separator

* PS-1009 Removed unnecessary ImeOptions setting from NoEmojiKeyboardEffect
Improved code

* PS-1009 Removed unnecessary null validation on Android's NoEmojiKeyboardEffect

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
This commit is contained in:
aj-rosado
2022-08-16 18:54:28 +01:00
committed by GitHub
parent 5f7a1e769a
commit 3d9555d420
6 changed files with 69 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
using System;
using Bit.iOS.Core.Effects;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportEffect(typeof(NoEmojiKeyboardEffect), nameof(NoEmojiKeyboardEffect))]
namespace Bit.iOS.Core.Effects
{
public class NoEmojiKeyboardEffect : PlatformEffect
{
protected override void OnAttached()
{
if (Element != null && Control is UITextField textField)
{
textField.KeyboardType = UIKeyboardType.ASCIICapable;
}
}
protected override void OnDetached()
{
}
}
}

View File

@@ -203,6 +203,7 @@
<Compile Include="Utilities\UISearchBarExtensions.cs" />
<Compile Include="Renderers\CollectionView\CollectionException.cs" />
<Compile Include="Renderers\CollectionView\ExtendedGroupableItemsViewDelegator.cs" />
<Compile Include="Effects\NoEmojiKeyboardEffect.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\App\App.csproj">