Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8383] iOS: Feature to add a property to detect if keyboard is being displayed or not

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-04-13T14:13:54.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.2, Release 2.1.0, Sprint 2012-08
ComponentsiOS
LabelsSupportTeam, api, module_app_properties, qe-testadded
ReporterVarun Joshi
AssigneeStephen Tramer
Created2012-03-28T16:47:11.000+0000
Updated2013-10-17T10:06:30.000+0000

Description

It has been requested to add a new feature to check if soft keyboard on the device is displayed or not.

Comments

  1. Pedro Enrique 2012-04-09

  2. Stephen Tramer 2012-04-11

    This issue is not a duplicate of TIMOB-7724. They describe independent (but related) features.
  3. Stephen Tramer 2012-04-11

    Testing

    ----
       
       var win = Ti.UI.createWindow({
       	backgroundColor:'white'
       });
       var input = Ti.UI.createTextField({
       	width:200,
       	height:40,
       	value:'click me',
       	top:20,
       	borderStyle:Ti.UI.INPUT_BORDERSTYLE_LINE
       });
       
       function isVisible() {
       	input.value = 'visible? '+Ti.App.keyboardVisible;
       }
       
       input.addEventListener('click', isVisible);
       
       var button = Ti.UI.createButton({
       	width:200,
       	height:40,
       	title:'keyboard visible?',
       	top:80
       });
       button.addEventListener('click', isVisible);
       
       win.add(input);
       win.add(button);
       win.open();
       
    If the feature works correctly, the field text will change to "visible? x" when you click on the button, where "x" is the current value of whether or not the keyboard is visible. Note that you can click on the button while the text field is still focused.
  4. Max Stepanov 2012-04-12

    PR https://github.com/appcelerator/titanium_mobile/pull/1986 merged.
  5. Natalie Huynh 2012-06-11

    Tested with iPhone 4s 5.0.1 with 2.1.0.v20120608174150
  6. jithinpv 2013-10-17

    please implement this feature for android

JSON Source