【发布时间】:2016-08-20 02:48:24
【问题描述】:
我有一个包含文本区域的模式视图,当显示模式时,我希望键盘出现。这是我的代码
$ionicModal.fromTemplateUrl('templates/inputtextarea.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal;
$scope.modal.show().then(document.getElementById("textarea").focus());
document.getElementById("textarea").maxLength = 256;
});
第一次显示模态时显示键盘,但是当我关闭模态然后再次显示以更新textarea中的文本时,键盘不显示?为什么是第一次显示,而不是第二次、第三次等......我怎样才能在每次显示模态时显示它?
谢谢
【问题讨论】:
标签: javascript angularjs ionic-framework angular-ui-bootstrap