md-input-container不关注IOS中的md-input

时间:2019-09-18 15:04:19

标签: ios angular angular-material

以下是iOS 12的问题。在触摸时,input元素专注于md-input-container,而不关注输入。这意味着光标消失在输入字段上,并且屏幕向下滚动。在网上检查ng-touched是否为假。它拉动了md-input-conatiner的风格。

这是我的代码:

<md-input-container
        class="form-group phx-ic"
        flex-offset-gt-xs="15"
        flex-gt-sm="30"
>

    <input
        class="phx-single-input-per-row"
        type="text"
        phx-currency
        name="requestedAmount"
        id="requestedAmount"
        tabindex="1"
        placeholder="{{'lapp.app.input'|translate}}"
        ng-model="vm.application.requestedAmount"
        ng-keypress="checkrange(loanappForm)"
        ng-change="checkrange(loanappForm)"
        ng-blur="checkrange(loanappForm)"
        md-no-asterisk
        required
        onkeypress='return event.charCode<31 || (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 46 || event.charCode == 8)'
    >

    <div ng-messages="loanappForm.requestedAmount.$error">
        <div
            ng-message="required"
            data-translate="lapp.app.error.required"
        ></div>
        <div
            ng-message="valid" 
            data-translate="lapp.app.error.range"
        ></div>
        <div
            ng-message="pattern" 
            data-translate="lapp.app.error.range"
        ></div>
        <div
            ng-message="refirange" 
            data-translate="lapp.app.error.refirange"
        ></div>
        <div
            ng-message="range" 
            data-translate="lapp.app.error.range"
        ></div>
    </div>
</md-input-container>

0 个答案:

没有答案