0
Here's the code..
<div class="input-wrapper">
<div class="col-xs-9 col-sm-10 col-md-11 col-lg-11">
<input type="text" class="form-control message-input" ng-keypress="($event.charCode === 13) ? vm.addMessage($event) : null"
data-prod-idx="{{index}}" data-id="{{prod.ProductId}}"
ng-model="vm.models.msgText" ng-init="vm.models.msgText=''" placeholder="Type your message here...">
</div>
<button type="submit" class="btn btn-small btn-submit col-xs-2 col-sm-2 col-md-1 col-lg-1 message-send" ng-click="vm.addMessage($event)" data-prod-idx="{{index}}" data-id="{{prod.ProductId}}">Send</button>
</div>
사용자가 메시지를 보낼 수있는 메시지 대화 상자를 구현하려고합니다. 어디에서나 작동하는 버튼을 클릭하면 Firefox에서만 onkeypress가 작동하지 않습니다.Firefox에서 데이터를 제출하지 않는 키를 입력하십시오. IE 및 Chrome 및 Safari에서 잘 작동합니다.
그것은 :( – Mohit
@Mohit 작동하지 않습니다.'charCode' keyCode''로 교체합니다. – wuxiandiejia
작업 이제 ... 감사합니다 :) – Mohit