Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27332] iOS 13: Modal windows that are swiped down do not fire close event

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2019-08-22T15:57:03.000+0000
Affected Version/sRelease 8.2.0
Fix Version/sRelease 8.2.0
Componentsn/a
Labelsn/a
ReporterHans Knöchel
AssigneeVijay Singh
Created2019-08-12T15:15:53.000+0000
Updated2019-08-30T11:08:21.000+0000

Description

iOS 13+ modal windows that are swiped down do not fire close event (in this case the console log):
var win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});

var btn = Ti.UI.createButton({
    title: 'Trigger'
});

btn.addEventListener('click', function() {
    var win2 = Ti.UI.createWindow({ backgroundColor: 'white' });

    win2.addEventListener('close', () => {
        Ti.API.warn('CLOSED')
    });

    var nav = Ti.UI.createNavigationWindow({
        window: win2
    });
    
    nav.open({ modal: true })
});

win.add(btn);
win.open();

Comments

  1. Hans Knöchel 2019-08-12

    Pull: https://github.com/appcelerator/titanium_mobile/pull/11135
  2. Donovan Lewis 2019-08-19

    I can confirm that swiping down on the Modal in iOS 13 does not work as it should. The close event is not fired, adding a close button works perfect, but if the user pulls the view down as is expected in iOS 13 it does not work. Sample code with Close button & log.
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
        
       var btn = Ti.UI.createButton({
           title: 'Trigger'
       });
       
       var winClose = Ti.UI.createButton({
           title: 'Close'
       });
        
       btn.addEventListener('click', function() {
           var win2 = Ti.UI.createWindow({ backgroundColor: 'white' });
        
           win2.addEventListener('close', () => {
               Ti.API.warn('CLOSED')
           });
        
           var nav = Ti.UI.createNavigationWindow({
               window: win2
           });
          
           nav.add(winClose);
       
           nav.addEventListener('open', () => {
               Ti.API.warn('OPENED')
           });
       
           nav.open({ modal: true })
       
           winClose.addEventListener('click', () => {
               nav.close()
           });
       
       });
        
       win.add(btn);
       win.open();
       
  3. Vijay Singh 2019-08-21

    [~hknoechel] [~dlewis23] This issue has been fixed as part of TIMOB-27169. Can you please test using PR https://github.com/appcelerator/titanium_mobile/pull/11057. Thanks!
  4. Samir Mohammed 2019-08-30

JSON Source