PhoneGap的按钮不火,由于QUOT&; singleCursorHandlerTouchEvent -getEditableSupport FASLE" [英] Phonegap button does not fire due to "singleCursorHandlerTouchEvent -getEditableSupport FASLE"

查看:95
本文介绍了PhoneGap的按钮不火,由于QUOT&; singleCursorHandlerTouchEvent -getEditableSupport FASLE"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个PhoneGap的按钮不火的最新的Andr​​oid 4.0.3。我得到的调试消息

 singleCursorHandlerTouchEvent -getEditableSupport FASLE

(注意拼写错误FALSE)之后,按钮不闪光或做任何事情。按钮的code是

 <的div {{行动someAction}}>点击此处< / DIV>


解决方案

有一个类似的问题,这里与相同的消息。看来这是通过调整一个div解决。我已经得到了同样的调试消息,但它不会影响我的事件处理程序。它也取决于的被测试的设备/模拟器。例如,显示此消息对三星Galaxy S2运行ICS 4.0.3,但在仿真器或一个的Nexus S 4G运行相同的Andr​​oid版本不显示。最后,(对我来说)出现在屏幕的WebView内的任何水龙头的消息。因此,这将表明这是一个简单的调试消息绑在web视图的活动,而不是与PhoneGap的一个问题。

你有按钮的事件处理程序或者是他们根本HREF链接?我假设{{行动someAction}}将是某种类似的onclick =处理程序使用functionName()中。尝试事件处理程序附加到任何按钮。使用普通的js语法:

 的document.getElementById('ButtonID')。的addEventListener('点击',功能(){
     警报(点击);
}

A phonegap button does not fire in the newest Android 4.0.3. I get the debug message

"singleCursorHandlerTouchEvent -getEditableSupport  FASLE" 

(notice the wrongly spelled FALSE) after which the button does not fire or do anything. The button's code is

<div {{action someAction}}>click here</div>

解决方案

There was a similar problem here with the same message. It seems that was solved by resizing a div. I've gotten this same debug message, but it does not affect my event handlers. It also depends on the device/simulator that's being tested. For instance, this message is displayed on a Samsung Galaxy S2 running ICS 4.0.3, but does not show up in the emulator or a Nexus S 4G running the same Android version. Finally (for me) the message appears for any tap within the webview screen. Therefore it would indicate this is simply a debug message tied to the webview activity and not a problem with phonegap.

Do you have event handlers for the buttons or are they simply href links? I'm assuming the {{action someAction}} would be some sort of handler like onclick="functionName()". Try attaching an event handler to any of the buttons. Using normal js syntax:

document.getElementById('ButtonID').addEventListener( 'click', function(){
     alert('clicked');
}

这篇关于PhoneGap的按钮不火,由于QUOT&; singleCursorHandlerTouchEvent -getEditableSupport FASLE&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆