Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14591] iOS: iPad: textArea.blur() not working within modal view when modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2013-07-17T23:36:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterCarter Lathrop
AssigneeIngo Muschenetz
Created2013-07-17T22:33:25.000+0000
Updated2017-03-20T22:22:03.000+0000

Description

*Problem* textArea.blue() is not working when inside a modal view with modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET. If modalStyle is left out, the code works as expected. *Test Case*
var win = Ti.UI.createWindow({
	backgroundColor : 'gray'
});

var modalWin = Ti.UI.createWindow({
	backgroundColor: 'red',
});



modalWin.addEventListener("click", function(e){
        Ti.API.info("clicked"); //this is called when I click
        textArea.blur(); // this should clear the keyboard
    });
 
    var textArea = Ti.UI.createTextArea({
      top: 15,
      width: Ti.UI.FILL, height : 140, left: 20, right: 20
    });    
 

modalWin.add(textArea);

win.open();

modalWin.open({
	modal: true,
	modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL,
    modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET //comment this out to see this working as expected
	
});
*Expected Result* text area blurs and keyboard loses focus *Actual Result* event listener is triggered (eg 'click' is outputted to consol) but the blur function is not applied to the text area.

Comments

  1. Blain Hamon 2013-07-17

    TIMOB-3109 is the original JIRA explaining this is Apple's intended behavior. TIMOB-6060 is for a new feature to change the behavior.
  2. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source