Commit becfe052 by Garri Adrian Nablo

issue-1030: Reset cursor when toggling isSecureTextEntry.

parent b01afaa2
......@@ -644,6 +644,13 @@ fileprivate extension TextField {
func handleVisibilityIconButton() {
isSecureTextEntry = !isSecureTextEntry
/// Workaround: Reassign text to reset cursor
/// This is a known issue with UITextField
/// Source: https://stackoverflow.com/questions/14220187/uitextfield-has-trailing-whitespace-after-securetextentry-toggle
let textHolder = text
text = " "
text = textHolder
UIView.transition(
with: (visibilityIconButton?.imageView)!,
duration: 0.3,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment