Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14615] Android: returnKeyType not working with TextArea

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-01-20T18:26:51.000+0000
Affected Version/sRelease 3.1.0, Release 3.1.1, Release 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsAndroid
Labelsmodule_textarea, qe-testadded
ReporterDavide Cassenti
AssigneeBiju pm
Created2013-07-22T10:10:59.000+0000
Updated2017-03-22T18:15:35.000+0000

Description

Problem description

When setting returnKeyType on a TextArea, the default return type is shown anyway.

Steps to reproduce

Use the following code to see the issue:
var win = Ti.UI.createWindow({
	backgroundColor: "black"
});

var txt = Ti.UI.createTextArea({
	returnKeyType: Ti.UI.RETURNKEY_SEARCH,
	left: 10,
	right: 10,
	top: 10,
	height: 300
});
win.add(txt);

win.open();

Note

This works in native, although you cannot go to other lines. To enable it, the element should have:
android:inputType="textImeMultiLine"

Comments

  1. Biju pm 2013-08-06

    PR:- https://github.com/appcelerator/titanium_mobile/pull/4544
  2. Priya Agarwal 2013-10-10

    Verified the fix with: Appc-Studio: 3.2.0.201310100354 Sdk:3.2.0.v20131009134844 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Google Nexus 7(v4.3),ipodTouch1(v7.0) Xcode: 5 returnKeyType working for TextArea. Checked with type "Ti.UI.RETURNKEY_SEARCH"
  3. Allen Yeung 2013-10-30

    Another test case:
       var win = Ti.UI.createWindow({
           backgroundColor: "black"
       });
        
       var txt = Ti.UI.createTextArea({
           autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_ALL,
           left: 10,
           right: 10,
           top: 10,
           height: 300
       });
       var button = Ti.UI.createButton({title: 'toggle returnKeyType', height: '100dp', top: '200dp'});
       
       button.addEventListener('click', function(e) {
           txt.returnKeyType = Ti.UI.RETURNKEY_SEARCH;
       });
       win.add(txt);
       win.add(button);
        
       win.open();
       
    Which was fixed by https://github.com/appcelerator/titanium_mobile/pull/4825
  4. Ping Wang 2014-01-10

    Reopen the ticket since this fix is reverted (https://github.com/appcelerator/titanium_mobile/pull/5202, https://github.com/appcelerator/titanium_mobile/pull/5208).
  5. Ingo Muschenetz 2014-01-20

    This behavior change caused a lot of complaints in the community, so we've reverted the behavior. If a user wishes to have this back again, they will need to re-add the code we've removed in a custom build of the SDK.
  6. Bogdan Pankiv 2014-07-01

    Why don't you update your documentation that returnKeyType doesn't work with TextArea in android? http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.TextArea - here we can see that this property is supported in Android. But this is fake!
  7. Ingo Muschenetz 2014-07-06

    [~bhatfield] Can you please update the docs?
  8. Malcolm Hollingsworth 2015-01-31

    [~ingo] The docs have still not been updated on this I am sure this could and should have been achieved in the last 7 months time. The ticket is marked as closed so guessing this has fallen through the cracks.
  9. Ingo Muschenetz 2015-04-16

    [~core13], actually, this should have been addressed by TIDOC-1754.
  10. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source