shmert
June 23, 2014, 8:20pm
1
Simple $ionicPopup is not auto-focusing on the input in mobile safari. Works correctly on desktop Safari.
var myPopup = $ionicPopup.show({
template: '<input type="tel" autofocus="true">',
title: 'Enter Odometer Mileage',
scope: $scope,
buttons: [
{ text: 'Cancel' },
{
text: '<b>OK</b>',
type: 'button-positive',
}
];
});
The modal pops up correctly, but I must manually click into the field to focus it.
This works when combined with cordova to make an hybrid app. As far as mobile safari goes, you may not have the same permissions, such as being able to trigger the keyboard to show with out user input.
shmert
June 23, 2014, 10:33pm
3
I tried this in ios emulation and am not getting focus on the input. Is there a way to submit a sample app for you to verify this bevahior?
For it to work with cordova you need to add this in your config.xml
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
i try this , but it doesn’t works for me
@areschen , is this in mobile safari or on a native app?