【发布时间】:2016-06-29 12:21:54
【问题描述】:
当我在第一个字段中输入文本时,文本会显示出来。使用选项卡或鼠标转到下一个字段后,该字段保持空白。这适用于除第一个字段之外的所有字段。
我有以下 HTML:
<form name="HomeAccountForm" ng-submit="HomeAccountForm.$valid && fModel.accept && submit()" novalidate>
<input name="firstname" type="text" placeholder="Voornaam*" ng-model="fModel.firstname" required>
<input name="lastname" type="text" placeholder="Achternaam*" ng-model="fModel.lastname" required>
<input name="profilename" type="text" placeholder="Profielnaam*" ng-model="fModel.profilename" required>
<input name="email" type="email" placeholder="Email*" ng-model="fModel.email" required>
<input name="password" type="password" placeholder="Wachtwoord*" ng-model="fModel.password" required>
<input name="passwordCheck" type="password" compare-to="fModel.password" placeholder="Wachtwoord herhaling*" ng-model="fModel.passwordCheck" required>
<input type="checkbox" id="accept" name="accept" ng-model="fModel.accept" />
<label for="accept">Ik ben 18 jaar of ouder en ga akkoord met de <a href="/#/">Algemene Voorwaarden.</a>*</label>
<input type="submit" class="button" ng-disabled="!HomeAccountForm.$valid || !fModel.accept" value="Bevestigen">
</form>
如果我删除占位符,一切正常。当我删除所有 ng-model 时,同样适用。
但这仅发生在 safari(桌面/IOS)中。
我还测试了 Firefox、IE8、IE9、IE10、Chrome 和 safari 技术预览版,但这里一切正常。
在图像中,我正在输入所有字段。仅在文本中的第一个结果中
【问题讨论】:
标签: javascript html angularjs safari