Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3109] Blur & MODAL_PRESENTATION_FORMSHEET == Keyboard not hiding.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionHold
Resolution Date2011-07-05T16:05:14.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-27
ComponentsiOS
Labelsblur, defect, ios, keyboard, modalstyle, reported-1.5.1, reported-1.6.0
ReporterSam Jordan
AssigneeBlain Hamon
Created2011-04-15T03:37:13.000+0000
Updated2017-03-21T21:16:08.000+0000

Description

I've found out that when a textField is on a modal window, with a modalStyle set to the constant of Titanium.UI.iPhone.MODAL_PRESENTATION_FORMSHEET the keyboard is not able to loose focus properly.

What happens when blur() is called is cursor focus is lost from the textField yet the keyboard remains on the screen and is unresponsive to touch events. I have written a small app.js so that this bug can be reproduced.

Running Titanium Developer v1.2.2 on OSX 10.6.6 and Titanium SDK v1.5.1 on an iPad Project (simulator and device). I'm 99.9% sure it's this line
"modalStyle: Titanium.UI.iPhone.MODAL_PRESENTATION_FORMSHEET" as removing it fixes the problem.

var window = Titanium.UI.createWindow({
    backgroundColor: '#eee'
});

var textField = Titanium.UI.createTextField({
    height:35,
    top:300,
    width:350,
    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
});

textField.addEventListener('return', function(e) {
    textField.blur();
});

window.add(textField);
window.open({
    modal:true,
    modalTransitionStyle: Titanium.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL,
    modalStyle: Titanium.UI.iPhone.MODAL_PRESENTATION_FORMSHEET
});

Attachments

FileDateSize
Modality.zip2011-07-05T16:03:04.000+000028791

Comments

  1. kosso 2011-04-15

    I'm also seeing this on the iPad using the current 1.7.0 SDK in github with textFields on a MODAL_PRESENTATION_FORMSHEET modal window.

    textfield.blur() removes the caret, but the keyboard is still up.

  2. Pedro Enrique 2011-05-02

    We have a Helpdesk ticket that needs this fixed as well. http://support.appcelerator.com/tickets/ZKE-13322-962/homepage Ti SDK 1.6.2 and iOS 4.3
  3. Alan Leard 2011-06-30

    Here is another HD ticket waiting for resolution: http://support-admin.appcelerator.com/display/APP-714669
  4. Blain Hamon 2011-07-05

    This XCode project demonstrates how the behavior is designed by Apple even outside of Titanium.
  5. Blain Hamon 2011-07-05

    Turns out this is by Apple's design. I was successfully able to recreate the behavior natively (Not using Titanium) and indeed the OS keeps the keyboard up when the modal is a form sheet.
  6. Blain Hamon 2013-07-17

    6060 is a feature request to allow for the nonstandard functionality of keyboard hiding on a formsheet.
  7. Lee Morris 2017-03-21

    Closing ticket due to the time that has passed since it was filed.

JSON Source