Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dismiss keyboard, no way to get it back #171

Closed
roarapps opened this issue Dec 10, 2016 · 10 comments
Closed

Dismiss keyboard, no way to get it back #171

roarapps opened this issue Dec 10, 2016 · 10 comments

Comments

@roarapps
Copy link

On an iPad, if you tap on the close keyboard button at the bottom right.

Even if you tap on the digits, there is no way for the keyboard to come back up

@rolandleth
Copy link
Owner

Hello,

Does it also happen on the demo app? Turning on / changing / turning off? Does it also happen on the simulator? Because I don't have a real iPad to debug the issue.

@roarapps
Copy link
Author

Replicated on the demo app on the simulator, just run it in an ipad sim

@rolandleth
Copy link
Owner

When does it happen?

@roarapps
Copy link
Author

Anytime the lock screen comes up, either to enable to the passcode or to unlock the screen.

its easy to replicate -

  1. Set device sim to iPad
  2. enable lockcode, the lockscreen comes up with the keyboard, tap on the dismiss keyboard button at the bottom right.

@rolandleth
Copy link
Owner

Thank you! I'll try to look into it when I get home. Any particular iOS version it happens on?

@roarapps
Copy link
Author

I;m guessing it would happen on all iPad version that have the dismiss keyboard button.

In your MakeDigitField method, you have "field.userInteractionEnabled = NO;" which is probably not allowing the keyboard to come up when you tap on it.

Also, probably should open a different issue, could you modify

#define LTHMainWindow [UIApplication sharedApplication].windows[0]

to

#define LTHMainWindow [UIApplication sharedApplication].windows[ [UIApplication sharedApplication].windows.count - 1]

?

@rolandleth
Copy link
Owner

rolandleth commented Dec 10, 2016

I don't know the code by heart, but you might be right about the keyboard.

Even though your solution makes more sense, I'm not 100% confident about making a change there. There's a comment next to it, and an issue marked with needs-help about it, and, to be honest, I fear it might break something.

Would #undef + redefining it work? Might not, being declared inside the library, but you could give it a try.

Nonetheless, I'll also look into the change, and test it out, but it would help tremendously if you could also have a look, especially since you're using more than one window, as far as I understood.

@roarapps
Copy link
Author

I think as you always want the topmost window, the suggested change would be safe. I didn't have luck with undef. It would be awesome if it could be incorporated as i don't want to modify a local copy of the code.

@rolandleth
Copy link
Owner

rolandleth commented Dec 10, 2016

The userInteraction is set to false on fields because there's a hidden textField that acts as a proxy for entering the passcode, and the focus is on that. The problem lies in how the iPad treats soft vs hard keyboards, and for that I'll need a real device. I'll try to look at it Monday.

Also, using windows.count - 1 breaks the case where there's an actionSheet visible when displaying the lockscreen: after closing the sheet, you can't enter the passcode anymore. At this point, I'm not sure how developers are using the library, and I'd rather not make their users end up in a state where they can't use the app anymore.

@rolandleth
Copy link
Owner

Fixed in 3.8.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants