Textarea返回键侦听器在iOS Appcelerator中调用了两次?

时间:2014-11-18 07:15:30

标签: ios keylistener titanium-alloy appcelerator-mobile uitextarea

我在Titanium appcelerator iOS中为textArea返回键监听器编写了一个函数。

$.returnText.addEventListener('return', function(e) {
$.replyMessageTxt.blur();
console.log("click return key");
callbackend() // here will call back end via Api call
});

遇到以下问题:

  • 当我点击返回键时,它调用了两次。
  • 通过' / n' '%0A'
  • 向后端发送文字

我不知道为什么会这样。有人可以帮我解决这个错误!

谢谢

0 个答案:

没有答案