freshOS / KeyboardLayoutGuide

⌨️ KeyboardLayoutGuide, back from when it didn't exist.
MIT License
1.19k stars 60 forks source link

Fix for animation glitch when swithcing from a normal textfiled to a password textflied #31

Closed EfraimB closed 4 years ago

EfraimB commented 4 years ago

Hello,

First of all congrats for the lightweight and great implementation. It's the best i've seen so far. There is a bug where when switching the first responder from a normal textfield to a secured textfield, a weird animation is performed. This is cause because for some reason the keyboardWillChangeFrame notification is called not once but three times, the first one being a weird value. In order to fix this, we just have to perform the change animated only when the duration specified in the notification is greater than 0.

Here is a screen recording of the bug: https://my.pcloud.com/publink/show?code=XZO6ibkZ92g9nOy76gbtm7VTohGNg0GDcq27

s4cha commented 4 years ago

Hi @EfraimB thanks a lot for the kind words. Good job for noticing the issue, reporting it with a video is really appreciated. And providing a clean fix, what's more to ask really ? this is 👌 🥇 .

nastasiupta commented 4 years ago

I still have this issue when Website & App Passwords Autofill Section is showed above the keyboard

EfraimB commented 4 years ago

Can you provide a screen recording of your issue?

nastasiupta commented 4 years ago

@EfraimB https://drive.google.com/open?id=10aT5_bdBY7Qo2RtKH_Xzw8xLRGiMLek5

EfraimB commented 4 years ago

Yeah, i noticed that bug on some of my apps as well. Unfortunately the keyboardWillChangeFrame provides a duration greater than 0 so the animation is happening. The only solution I am thinking of it to disable the animations before resigning as a first responder(the glitch might still happen but no animated).

nastasiupta commented 4 years ago

hmmm :/ not a very nice solution ...