Я пишу на angularJS и использую Cordova для сборки для iOS и Android, и у меня есть следующая директива. Я не уверен, как изменить, чтобы он мог работать и на iOS. У кого-нибудь есть идеи?
function moveNextInput() {
return {
restrict: 'A',
link: function ($scope, element) {
element.on("input", function (e) {
if (element.val().length == element.attr("maxlength")) {
var $nextElement = element.next();
if ($nextElement.length) {
$nextElement[0].focus();
}
}
}).keyup(function (e) {
if (e.which === 8 && !this.value) {
//$(this).prev().focus();
focused = $(this); // to point to currently focused
}
});
}
}
};