Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8606] IOS: TextArea selected event throws exception

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-19T21:09:45.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0, Sprint 2012-07
ComponentsiOS
Labelsapi, module_textarea, qe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2012-04-06T09:33:19.000+0000
Updated2013-11-07T05:36:30.000+0000

Description

Run this code below. Logs will show the following exception [TiRange boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x8dc9850
var win1 = Titanium.UI.createWindow({ backgroundColor:'#fff' });

var ta = Ti.UI.createTextArea({
	value:'I am a text area',
	width:Ti.UI.FILL,
	height:100,
	borderStyle:Ti.UI.INPUT_BORDERSTYLE_LINE,
	borderWidth:1
})

ta.addEventListener('selected',function(e){
	Ti.API.info('Selected Fired Location:'+e.range.location+" Length:"+e.range.length)
})

win1.add(ta);
win1.open();

Comments

  1. Michael Pettiford 2012-06-19

    Vishal When testing this I don't see the exception anymore, but I do see that the selected event is being fired twice. Is the expected behavior for the selected event to be fired twice?
  2. Vishal Duggal 2012-06-19

    We fire the selected event whenever the native OS says that the selection has changed. If the native code reports it twice we report it twice. Nothing in our code is generating the event twice.
  3. Michael Pettiford 2012-06-23

    Closing issue Tested with Ti Studio build 2.1.0.201206211609 Ti Mobile SDK 2.1.0.v20120622174154 hash rdc9dfbe5 OSX Lion 10.7.3 iPhone 4S OS 5.1 Verified expected behavior is shown
  4. ankur garha 2012-12-14

    Found this bug again:- In version 2.1.4.GA of Titanium SDK Event is being triggered twice in iPad
  5. Shameer Jan 2013-11-07

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4876

JSON Source