Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9006] Android: UI.TextArea/Field hasText method not working

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-05-06T03:32:47.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterPaul Dowsett
AssigneeNeeraj Gupta
Created2012-05-06T03:25:42.000+0000
Updated2017-03-10T19:14:00.000+0000

Description

Problem

TextField and TextArea hasText() method not functioning.

Test Case

var win = Ti.UI.createWindow({
  backgroundColor: 'white',
  exitOnClose: true,
  fullscreen: false,
  layout: 'vertical',
  title: 'hasText Demo'
});

var textField = Ti.UI.createTextField({
    color: '#336699',
    backgroundColor:'#eee',
    top: 10, left: 10,
    width: 250, height: 60,
    borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});
win.add(textField);

var textArea = Ti.UI.createTextArea({
    borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
    backgroundColor:'#eee',
    color: '#336699',
    top: 10, left: 10,
    width: 250, height: 200
});
win.add(textArea);


win.open();

textField.addEventListener('click', function(e){
	Ti.API.info('hasText? ' + e.hasText());
});

textArea.addEventListener('click', function(e){
	Ti.API.info('hasText? ' + e.hasText());
});

Comments

  1. Paul Dowsett 2012-05-06

    Duplicate of TIMOB-996.
  2. Lee Morris 2017-03-10

    Closing ticket as duplicate.

JSON Source