简体   繁体   中英

Google maps with ngmap mobile issue

I'm using google maps with ngmap in an angular application and I'm having an issue with a custom marker .

My custom marker has an input field inside to set a custom name for my location. The problem is that on mobile (Android & iOS) I cannot access this field to write into. (Basically I cannot tap on the input field) Do you have any idea on why would that happen?

I've got my code here to see this thing in action.

You can try this:

HTML:

<div class="infobox">
  <div class="infobox__custom-name">
    <input autofocus type="text" ng-model="vm.eventLocation.name" ng-click="vm.click($event)">
  </div>
  <div class="infobox__address">{{vm.eventLocation.address}}</div>
</div>

JS:

 vm.click = function(e) {
    e.target.focus();
  }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM