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

Problem with method setValue in google places. #301

Open
JordiGiros opened this issue Oct 17, 2018 · 5 comments
Open

Problem with method setValue in google places. #301

JordiGiros opened this issue Oct 17, 2018 · 5 comments

Comments

@JordiGiros
Copy link

JordiGiros commented Oct 17, 2018

Some pages that use google places in their inputs delete their values when losing focus from the element. When the setValue method is called, his behaviour makes the input lose the focus and the place can't be selected because the value typed is lost. That makes some test to crash.

The problem seems to be related to the "Prevent firing the "change" event twice" problem.
Some time ago, the method used a TAB added after the value that was making the problem happen too.
It was solved #244 deleting the TAB but then the problem returned with #286.

After reading lots of problems related with this two behaviours of setValue method (causing problems in each type of solutions), why can a parameter be passed to the method in order to use it with or without losing focus?

Is there any alternative to set the value without losing the focus from input?
Thank you.

@JordiGiros JordiGiros changed the title Method setValue in google places problem. Problem with method setValue in google places. Oct 17, 2018
@stof
Copy link
Member

stof commented Oct 17, 2018

If we only type in the field without moving the focus away, there is no change event in the browser. That's why setValue moves the focus away.

@JordiGiros
Copy link
Author

JordiGiros commented Oct 17, 2018

https://www.hoppa.com/ie -> Drop off location has a clear example of what I'm telling. I can find this problem in some other Ryanair.com or Suntransfers booking process inputs.
So there is no way (or I didn't find it) to set this input.

@JordiGiros
Copy link
Author

www.suntransfers.com -> Booking process step 3 Drop-off point have the same problem.

@JordiGiros
Copy link
Author

https://www.airbnb.com/ -> Search "To" also closes the dropdown from google places but does not delete the value from the input. You have to "refocus" the search input field.

@JordiGiros
Copy link
Author

JordiGiros commented Oct 17, 2018

This issue seems to be duplicated with 292

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