[AC-5553] Android: TextField do not fire touch events
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2018-02-08T04:53:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, click, textfield, touch |
Reporter | Sandro Lain |
Assignee | Shak Hossain |
Created | 2018-01-26T14:10:54.000+0000 |
Updated | 2018-02-08T04:53:06.000+0000 |
Description
TextField View on Android does not fire "click", "singletap", "doubletap", ...
Events are not fired even with editable = false
If TextField is set with touchEnable = false, events do not pass to the parent, no events are fired
Example code:
var cnt = $.UI.create("View", {
backgroundColor: "#FF0000",
height:Ti.UI.SIZE,
top: 100
});
var tf = $.UI.create('TextField', {
height: 40,
backgroundColor: "#FFFFFF",
borderWidth: 1, borderColor: "#000000",
left: 40,
right: 40,
top: 40,
bottom: 40,
editable: false,
touchEnabled: false
});
// Event on the parent element that emit the click event if directly touched
cnt.addEventListener("click", function()
{
alert('Click CNT OK');
});
tf.addEventListener("click", function()
{
alert('Click TF OK');
});
tf.addEventListener("singletap", function()
{
alert('SingleTap TF OK');
});
tf.addEventListener("doubletap", function()
{
alert('DoubleTap TF OK');
});
tf.addEventListener("longpress", function()
{
alert('LongPress TF OK');
});
cnt.add(tf);
$.win.add(cnt);
$.win.open();
Hello with SDK 7.0.1 click events do not occur even if touchEnabled = true and editable = true, virtually never With touchEnabled = false, click not bubble to parent Initially i tried to set editable = false to check if click events are fired
Hello, I wasn't able to reproducible the issue with your sample code, The click event in the view does fire. But the rest of the event does not since it's for the textfield and where "editable: false, and touchEnabled: false. Thanks.
Click events on TextField are never fired (even with the following code). Also with *touchEnabled: false* the event does not pass to the parent view.
Hello [~sandrolain], Thanks for your reply, According to [docs](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextField-property-touchEnabled) with touchEnabled: false the event forward to peers, not to parents. Anyway, I was able to reproduce the issue for click event in textfield with the below code
There is an issue with click event in textfield, Moving to TIMOB. Thanks.