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:
25
src/iOS.Core/Effects/NoEmojiKeyboardEffect.cs
Normal file
25
src/iOS.Core/Effects/NoEmojiKeyboardEffect.cs
Normal 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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user