[TIMOB-3109] Blur & MODAL_PRESENTATION_FORMSHEET == Keyboard not hiding.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Hold |
Resolution Date | 2011-07-05T16:05:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-27 |
Components | iOS |
Labels | blur, defect, ios, keyboard, modalstyle, reported-1.5.1, reported-1.6.0 |
Reporter | Sam Jordan |
Assignee | Blain Hamon |
Created | 2011-04-15T03:37:13.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
Modality.zip | 2011-07-05T16:03:04.000+0000 | 28791 |
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.
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
Here is another HD ticket waiting for resolution: http://support-admin.appcelerator.com/display/APP-714669
This XCode project demonstrates how the behavior is designed by Apple even outside of Titanium.
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.
6060 is a feature request to allow for the nonstandard functionality of keyboard hiding on a formsheet.
Closing ticket due to the time that has passed since it was filed.