Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10023] iOS: Gestures not recognized on interactive text elements (fields/areas)

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.0, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, reprod
ReporterStephen Tramer
AssigneeUnknown
Created2012-07-18T11:58:39.000+0000
Updated2018-02-28T20:03:53.000+0000

Description

Complex events (swipe, pinch, longpress, etc.) are not recognized on text elements: app.js
var window = Ti.UI.createWindow({backgroundColor: 'white'});
 
var eventInfo = function(e){
    Ti.API.info(e.type+' '+e.source);
}
  
var txt2 = Ti.UI.createTextArea({
    top: '10',
    left: '10',
    right:'10',
    height:'60',
    color:'#336699',
    boderWidth:2,
    borderColor:'#555',
    value: '',
    scrollable:false
});
  
window.add(txt2);
 
var toggle = Ti.UI.createButton({
    title:'Toggle Scollable',
    top:100
})
 
toggle.addEventListener('click',function(e){
    txt2.scrollable = !txt2.scrollable;
    Ti.API.info(txt2.scrollable);
});
 
window.add(toggle);
 
txt2.addEventListener('lswipe', eventInfo);
txt2.addEventListener('rswipe', eventInfo);
txt2.addEventListener('pinch', eventInfo);
txt2.addEventListener('longpress', eventInfo);
 
window.open();
This example should be modified to ensure that text fields process these events correctly as well. *NOTE:* If gesture recognition interferes with underlying behavior (it shouldn't, necessarily) then this ticket should be invalidated.

Comments

  1. Shameer Jan 2013-04-10

    Longpress evevnt works as expected, but swipe and pinch event not firing. Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-06-26

    I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source