Titanium JIRA Archive
Appcelerator Community (AC)

[AC-672] Swipe to close on app's home window hangs-up app

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-03-10T17:30:42.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsAlloy
Labelsdefect, ios, iphone
ReporterSascha Brose
AssigneeAminul Islam
Created2016-02-28T15:45:04.000+0000
Updated2016-03-10T17:30:42.000+0000

Description

I am using a NavigationWindow for the iPhone / iPad version of my app. When I perform a "swipe to close" gesture on the app's base / home window the screen blocks and it's not possible do any other action. Disabling "swipe to close" with setSwipeToClose(false) does not fix the issue.

Attachments

FileDateSize
After swipe to close on Gray Window and click on Click here.png2016-03-06T20:51:59.000+000035919
test.zip2016-03-06T20:52:12.000+00008177437

Comments

  1. Mostafizur Rahman 2016-03-01

    Hello, I have tested that issue you reported. Swipe event is working as expected in home window using a NavigationWindow for the iPhone / iPad version of my app. You can take help [here](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-swipeToClose). *Testing Environment:* Appcelerator Command-Line Interface, version 5.1.0 Titanium SDK Version:5.2.0 GA Platform: iOS Simulator: iphone 6/ iOS 8.0, iPad 2 / iOS 8.0 .*Test Code:*
       
       Titanium.UI.setBackgroundColor('#000');
       
       
       
       var win2 = Titanium.UI.createWindow({
       
       backgroundColor : 'gray',
       
       title : 'Gray Window'
       
       });
       
       
       
       var win1 = Titanium.UI.iOS.createNavigationWindow({
       
       window : win2,
       
       swipeToClose : false
       
       });
       
       
       
       var win3 = Titanium.UI.createWindow({
       
       backgroundColor : 'blue',
       
       title : 'Blue Window',
       
       //swipeToClose : false
       
       });
       
       
       
       var button = Titanium.UI.createButton({
       
       title : 'Click here',
       
       color : 'red',
       
       });
       
       
       
       win2.add(button);
       
       
       
       button.addEventListener('click', function(e) {
       
       Ti.API.info('Click event fired');
       
       
       
       win1.openWindow(win3, {
       
       animated : true
       
       });
       
       
       
       });
       
       
       
       var button2 = Titanium.UI.createButton({
       
       title : 'Click here',
       
       color : 'red',
       
       });
       
       
       
       win3.add(button2);
       
       
       
       button2.addEventListener('click', function(e) {
       
       alert('Click event fired');
       
       
       
       });
       
       
       
       win1.open();
       
       
       
    *Test Result:*
              [INFO] :   Click event fired
       
       
    *Steps to Test.* Firstly you have to create a project then copy the sample code and run the project. After running the project so you can see a gray color window and click on “ *Click here*” then blue color window will open. After open blue color window, You will swipe and click on “*Click here*"
  2. Sascha Brose 2016-03-05

    Hi Aminul, thank you for your response. I tested the code you provided in a new project as suggested. But I am getting the same behaviour as in my project / app. I did the following actions:

    Started app -> Gray Window is shown

    Did a swipe to close on Gray Window

    Clicked Click here on Gray Window -> Click event is fired but Blue Window does not show up and Click here is disabled

  3. Mostafizur Rahman 2016-03-06

    Hello, I have tested that issue you reported in my updated environment. It is working as expected. I provided my details below. Please provide your working environment details. *Test Environments:*
       Appcelerator Studio, build: 4.5.0.201602170821
        Command-Line Interface, version 5.2.0
       OS. Version                     = 10.11.3
       Node.js
         Node.js Version             = 0.12.7
         npm Version                 = 2.11.3
       
       Titanium SDKs  5.2.0.GA
       Simulator: iphone 6/ iOS 9.1
       Java Development Kit Version   = 1.7.0_25
       Xcode version  7.1.1
       
    *Steps to Test.* Firstly you have to create a project and copy the sample code into your project and run the project. You can see a gray color window and click on “ Click here” it will open the blue color window. Here, You can swipe first and click on “Click here”. See the console to check the event fired.
  4. Sascha Brose 2016-03-06

    Hi Mostafizur, please notice that you have to do a swipe to close on the Gray Window and click on Click here afterwards to reproduce the issue. The test case you described (open the Blue Window and swipe to close there) works for me too. But as I wrote, you have to do the swipe to close on the Gray Window even if you can't close this window like that, because it is the root window. I attached the project I tested the code you provided with (test.zip) as well as a screenshot after I did a swipe to close on the Gray Window and clicked on Click here. As you can see, Click here is disabled but the Blue Window isn't opened. Here are my environment details: {noformat} Appcelerator Studio, build: 4.5.0.201602170831 Command-Line Interface, version 5.0.6 OS. Version = 10.11.3 Node.js Node.js Version = 0.12.7 npm Version = 2.11.3 Titanium SDKs 5.2.0.GA Simulator: iphone 5s / iOS 9.2 Java Development Kit Version = 1.7.0_79 / 1.8.0_40 (tested both) Xcode version 7.2.1 {noformat}
  5. Sharif AbuDarda 2016-03-07

    Hello [~saschbro], I have tested the issue that [~mrahman] provided. I have followed your steps. After the app opens I did a swipe to close gesture in the first window (gray window) and then I click "click here" to open the second window (blue window). Here blue window opens as expected. Now, in the code if I set "swipeToClose : true" in the gray window in NavigationWindow. I can reproduce the issue that you described. But, If I set "swipeToClose : false", The issue did not occur. Here is my test environment
       Operating System
         Name                        = Mac OS X
         Version                     = 10.11.3
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       
       Node.js
         Node.js Version             = 4.2.2
         npm Version                 = 2.14.7
       
       Titanium CLI
         CLI Version                 = 5.0.6
       
       Titanium SDK
         SDK Version               = 5.2.0.GA
         Platform                      iPhone
         Simulator                    iPhone 6s Plus iOS SDK: 9.1
       

JSON Source