Looking for help with my code that displays a password input with a toggler overlaying it. The ion-toggle
directive is used to switch between the visible and hidden password inputs.
<label class="item item-input">
<input placeholder="Password" ng-hide="showPassword" type="password">
<input placeholder="Password" ng-if="showPassword" type="text">
<ion-toggle ng-model="showPassword" toggle-class="toggle-energized"> </ion-toggle>
</label>
Currently, when the toggler is in focus, the software keyboard disappears. This requires the user to tap back on the input to bring the keyboard back up.
Is there a way to automatically show/keep the keyboard visible when the toggler is in focus? I've attempted to create a directive to force focus back to the inputs, but it seems cumbersome, especially with two inputs involved.
Here's a simple demo. Keep in mind that a keyboard won't appear on a desktop browser.
Any advice or solutions would be greatly appreciated. Thank you.