Ionic 1.0.0-beta.3 fails to fill in the GooglePlacesAPI Autocomplete results on IPhones


#1

Hi there,

we have recently updated Ionic from 1.0.0-beta.1 to 1.0.0-beta.3, and noticed a strange behaviour with
the GooglePlacesAPI Autocomplete feature.

The snippet, that shows the problem is made available at:
http://codepen.io/slavik2121/pen/dzbDn

This snippet works fine when run in a browser, and the problem only occurs when the snippet is run as an AppGyver app on the mobile devices (tested when deployed to an IPhone5 with the AppGyver Scanner app).

Whenever the address is typed into an input element, the autocomplete offers a dropdown menu of possible addresses to pick from. Whenever one is selected, it should automatically transfer to the input box. This doesn’t happen on a mobile device, and whenever an address is selected from a dropdown, it doesn’t propagate to the input box.

We have narrowed the problem down to our update of Ionic from 1.0.0-beta.1 to 1.0.0-beta.3. As it is working in the browser, but refuses to work on a mobile device, we suspect the problem relates to the tapping events handling.


#2

Have you tried this with beta 4?

<link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">
<script src="http://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>

#3

Hi,

unfortunately, the newer version didn’t fix the problem.

Please let me know how I could assist in fixing the issue.

Thanks,
Slavik


#4

same problem i am facing! did u find any solution ?


#5

Hey there, check out this issue.


#6

I’ve created a really simple directive to help you guys reproduce this issue:

.directive('googleplace', function() {
  return {
    restrict: "A",
      scope: {
        googleplace: '=googleplace'
      },
      link: function(scope, element, attrs) {

        scope.gPlace = new google.maps.places.Autocomplete(element[0], {});

        google.maps.event.addListener(scope.gPlace, 'place_changed', function() {
          scope.$apply(function() {
          scope.googleplace = scope.gPlace.getPlace();
        });
      });
    }
  };
})

When I use the fix mentioned here I’m not able to select a location at all.

<input googleplace="place" type="text"/>

Android 4.4.4
Ionic 1.0.0-beta.11