-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
[paper-input] preventing exception when typing with mobile keyboard #551
[paper-input] preventing exception when typing with mobile keyboard #551
Conversation
👍 |
@Juraci I wonder why this fix is needed. I'm generally opposed to merging fixes without knowing what is the root cause of it. Do you have any idea? |
@miguelcobain I did not have the time to dig deeper into why this is happening on the mobile only. I do suspect that the setValue method is being called after a dialog action has been made, but I do not know why this happens when using the mobile keyboard only. A fix is definitely needed because the prompt dialog is currently unusable in mobile platforms |
@Juraci I think I know the root cause of the problem. What I suspect is happening is that, by the time The code would become something like: run.next(() => {
if (this.isDestroyed) { return; }
this.setValue(this.get('value'));
}); Could you please test this, and if it solves the issue, update the PR? |
@miguelcobain, sure I will do that. |
@miguelcobain you are correct, this solves the problem, just tested it here. |
@Juraci Great. While you're at it, could you please add an entry to the changelog? |
Thanks a lot for this! |
I got the following exception on paper-input when typing with the Android keyboard:
paper-input error
Cannot read property 'val' of undefined.
Steps to reproduce:
requirements:
Android smartphone with google chrome
Expected: Dialog closes
Actual: Dialog remains opened with the error linked above
The fix in the pull request prevents this exception while maintaining the current behavior.