Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Extra space remains after keyboard pops up

When you click on a text field in a ScrollView, some extra space is added at the bottom when the keyboard pops up. However, once you close the keyboard, it never goes away.

Here's a super short example app.js (~25 lines):


Anyone have an idea on a work-around? A "return" event listener on the text field would be the perfect place to clean up this space that's no longer needed, but nothing seems to work! I've tried setting the height and contentHeight, to no avail.

In my case, I'd even settle for disabling the scrolling when the keyboard is not visible, but the only way I've found is to set "touchenabled" to false, which then makes the text field unclickable!

— asked October 12th 2010 by Mike Dosey
  • height
  • iphone
  • keyboard
  • mobile
  • scroll
  • scrollview
  • space

3 Answers

  • Accepted Answer

    Looks like 1.4.3 solves this problem. Cause all of a sudden its gone. WOOOT!!!

    — answered November 23rd 2010 by Dave F
  • This is really obnoxious in my application. Any suggestions are appreciated.

    — answered October 12th 2010 by Mike Dosey
  • this worked for me, TI SDK 3.2.3.GA

    $.scrollView.contentHeight = Ti.Platform.displayCaps.platformHeight;
    — answered August 8th 2014 by eric harms
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.