小编Sor*_*iro的帖子

在使用javascript聚焦后立即在Android上输入松散焦点

我正在使用AngularJS开发Ionic App.

我得到了很少的输入(登录/注册的东西),当按下Enter键时 - 在Android上的按钮和iOS上的等效按钮 - 也就是说KeyCode 13,它通过自定义指令专注于下一个输入.

它在网络浏览器上运行得非常好,但在手机上,它会聚焦下一个输入,然后焦点会立即丢失,键盘会自行隐藏,迫使用户再次点击输入.

这是HTML:

<ion-view title="First Screen" hide-nav-bar="true" id="firstScreen" class=" ">
<ion-content padding="false" style="background: url(img/XAYpMMdUTvWFVAnrEhUi_restaurant.jpg) no-repeat center;background-size:cover;" class=" manual-remove-top-padding" scroll="false">
    <div class="">
        <img src="img/awdYDbeeSlSHCToXN5Lw_logo.png" width="auto" height="30%" style="display: block; margin-left: auto; margin-right: auto;">
    </div>
        <label class="item item-input " id="emailInput" name="email">
            <input class="invisible-input" type="email" placeholder="Email" ng-model="user.email" focus-me="currentInput == 0" ng-keyup="inputKeyEvent($event, 0)">
     </label>
    <label class="item item-input " id="passwordInput" name="password">
        <input class="invisible-input" type="password" placeholder="Mot de passe"  focus-me="currentInput == 1" ng-model="user.password" ng-keyup="inputKeyEvent($event, 1)">
    </label>
    <label …
Run Code Online (Sandbox Code Playgroud)

javascript android angularjs ionic-framework

5
推荐指数
1
解决办法
1114
查看次数

标签 统计

android ×1

angularjs ×1

ionic-framework ×1

javascript ×1