Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1465] Keyboard bounces up and down when focusing next text field

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-06-25T13:43:36.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsblur, focus, ios, iphone, keyboard
ReporterCarmen Wick
AssigneeNeeraj Gupta
Created2011-04-15T02:53:35.000+0000
Updated2017-03-09T21:29:30.000+0000

Description

I have a text field and some code to focus the next text field on the screen when the return key is tapped:

var txt = Titanium.UI.createTextField({
  height: 35,
  width: 200,
  right: 10,
  borderStyle = Titanium.UI.INPUT_BORDERSTYLE_LINE,
  autocorrect = false
});
txt.addEventListener('return', function()
{
  nextTextField.focus();
});

The problem is that about 60-90% of the time, the keyboard bounces down and up just a little bit before the next field is focused. I don't want this to happen; the keyboard should not move while the next text field is receiving focus because it's very distracting to the user.

Comments

  1. Clifton Labrum 2011-04-15

    I'm having this same issue on my iPhone 4 device (but not in the simulator).

    Assigning to Mr. Haynie.

  2. hal 2011-04-15

    I have tested android for this issue and, as of the latest build 1.4.x, android is not affected.

  3. Carmen Wick 2011-04-15

    Adding suppressReturn=false to the textfield seems to fix the problem. No idea why this works.

    I would think that suppressReturn=false would mean "No, do NOT suppress the default handling of the Return key, which would be to unfocus the text field" and suppressReturn=true would mean, "Yes, please DO suppress the default handling of the Return key. Do nothing when return is pressed, instead relying on the application to provide an event handler via the 'return' event on the textfield."

  4. Vishal Duggal 2012-06-25

    Fixed as part of TIMOB-628 fixes. See docs for behavior of suppressReturn
  5. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source