Electric-Coin-Company / zashi-ios

The Zashi Zcash Wallet, iOS Edition
MIT License
38 stars 12 forks source link

Autocomplete on macOS interferes with typing #1013

Open str4d opened 8 months ago

str4d commented 8 months ago

Describe the issue

The macOS keyboard's autocomplete is interfering with the ability to correctly type content into the app.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Install Zashi iOS on an ARM64 Macbook.
  2. Go to the send screen.
  3. Start typing into the memo field.

Expected behaviour

What I type should be what ends up in the memo field.

Actual behaviour + errors

Every so often parts of words disappear. When typing slowly, it appears that macOS attempts to autocomplete a word, and then the next letter typed replaces the first part of the word instead of being appended to it.

zerodartz commented 8 months ago

Maybe not related, but I have very similar, maybe same bug on my iPhone every so often on not Zashi but random apps using both default keyboard or some others. So just maybe it's a bigger issue somewhere deeper not Zashi?

LukasKorba commented 7 months ago

Maybe not related, but I have very similar, maybe same bug on my iPhone every so often on not Zashi but random apps using both default keyboard or some others. So just maybe it's a bigger issue somewhere deeper not Zashi?

I think this is a system level bug, nothing that can be fixed on Zashi level. But will investigate it at some point in near future. @true-jared is this a Zashi 1.0 hard requirement? If you read the desc, it's a case when Zashi is installed on a macbook, I don't think this is considered a valid case for Zashi 1.0.

true-jared commented 7 months ago

I agree @LukasKorba, if this is not an issue/blocker on the mobile device, we should push this to post-Zashi 1.0 and investigate it later on.

daira commented 1 month ago

Assuming it is actually caused by autocomplete / "inline predictive text", a user can probably work around it by turning that off globally. That said, it's obviously still a bug in the app, relative to other macOS apps.

Another possibility is to have the app turn off autocomplete for all fields that it affects:

textField.autocorrectionType = .no
textField.spellCheckingType = .no

This could be done conditionally if the app is running on macOS:

The isiOSAppOnMac property of ProcessInfo tells you whether your iOS app is running in macOS or iOS, but checking that property should always be your last choice. It’s better to run the same code on both platforms.