Commit dd7395b6 by Daniel Dahan Committed by GitHub

Merge pull request #1032 from garrialmighty/development

issue-1030: Reset cursor when toggling isSecureTextEntry.
parents af851bcb becfe052
......@@ -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