Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15574] iOS7: It is not possible close window inside a navgroup, after a small sliding

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-30T23:17:32.000+0000
Affected Version/sRelease 3.1.3
Fix Version/s2013 Sprint 23, 2013 Sprint 23 API, Release 3.2.0
ComponentsiOS
LabelsSupportTeam, module_navwindow, qe-testadded, triage
ReporterMatej
AssigneeVishal Duggal
Created2013-10-21T12:36:59.000+0000
Updated2014-02-21T08:48:22.000+0000

Description

Problem Description

When you have a NavigationWindow, you can open a window and then obtain either:

a left arrow to close the window

you can slide the window to close or

you can actually have a button that closes the window

If you do a small slide of the window and don't actually close it, the close button won't work anymore.

Steps to reproduce

1. Create a new mobile project with Mobile SDK 3.1.3 for iOS 7 2. Paste the provided testcase and run it. 3. Click the label "open window". 4. Do a little bit of scrolling and then get it back. 5. Click on the close window button, the window won't close.

Testcase

var win2 = Titanium.UI.createWindow({
    backgroundColor: 'red',
    title: 'Red Window'
});

var win1 = Titanium.UI.iOS.createNavigationWindow({
   window: win2
});

var win3 = Titanium.UI.createWindow({
    backgroundColor: 'blue',
    title: 'Blue Window'
});

var button = Titanium.UI.createButton({
    title: 'Open Blue Window'
});
button.addEventListener('click', function(){
    win1.openWindow(win3, {animated:true});
});

win2.add(button);
var button2 = Titanium.UI.createButton({
    title: 'Close Blue Window'
});
button2.addEventListener('click', function(){
    win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!
});

win3.add(button2);
win1.open();

Attachments

FileDateSize
1.png2013-10-21T12:37:00.000+000026661
2.png2013-10-21T12:37:00.000+000034722

Comments

  1. Mauro Parra-Miranda 2013-10-22

    Hello, tested this code:
       var win2 = Titanium.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red Window'
       });
       
       var win1 = Titanium.UI.iOS.createNavigationWindow({
          window: win2
       });
       
       var win3 = Titanium.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue Window'
       });
       
       var button = Titanium.UI.createButton({
           title: 'Open Blue Window'
       });
       button.addEventListener('click', function(){
           win1.openWindow(win3, {animated:true});
       });
       
       win2.add(button);
       var button2 = Titanium.UI.createButton({
           title: 'Close Blue Window'
       });
       button2.addEventListener('click', function(){
           win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!
       });
       
       win3.add(button2);
       win1.open();
       
    and works like a charm in 3.1.3.GA. Best, Mauro
  2. Matej 2013-10-22

    Hi, I have tried it again for fourth time and it basically doesn't work. Problem has to be on your side, please can you write me what you have done? (Steps)? Thank you
  3. Mauro Parra-Miranda 2013-10-22

    Hello, 1. Create the new mobile project with MobileSDK 3.1.3.GA 2. Paste thesample code into app.js 3. Compile it to the simulator in iOS7. 4. Run it. Best, Mauro
  4. Matej 2013-10-22

    Sorry ,but now I don't understand. Are these steps for me to try it again (It doesn't work anyway) or you have done it?
  5. Mauro Parra-Miranda 2013-10-22

    Hello Matej, I shared the code and the steps that i ran to test your issue. It works for me. What Mobile SDK are you using? Best, Mauro
  6. Matej 2013-10-22

    And what about these steps: 1. If you can see red window (Screen "1") click on the "Open blue window". 2. Drag just a little bit blue window (Screen "2") and push it back. (The most important one) 3. Click on the "Close Blue Window" - it doesn't work.
  7. Mauro Parra-Miranda 2013-10-22

    Hello, how do you manage to do that scroll? Can you test my code and i can't scroll it as you are showing. BEst, Mauro
  8. Matej 2013-10-22

    Just go with the cursor to the left side (Few pixels from left side), click and drag (Not completely!)
  9. Matej 2013-10-24

    Is it working for you?
  10. Mauro Parra-Miranda 2013-10-24

    Hello, I can't do the dragging, therefore is not crashing here. That should not be draggable. Best, Mauro
  11. Matej 2013-10-24

    Hi, the dragging is possible. Have you got device with iOS 7? If you want to go back you can click on "Back" button or drag the window. It works exactly same in the simulator ,but instead finger you have to use mouse/cursor. Please try it one more time if you won't be able do it I will make video for you. Thanks
  12. Mauro Parra-Miranda 2013-10-24

    Hello, already tried that, without success. Your video will be more than welcomed! Best, Mauro
  13. Matej 2013-10-24

    Done, http://www.qfpost.com/file/d?g=kSS3HhutF
  14. Mauro Parra-Miranda 2013-10-24

    I got the exact instructions about how to reproduce the bug, and I can reproduce it.
  15. Matej 2013-10-24

    Is possible to set up higher (High) priority for this bug? I think this is not just a regular bug that can wait... Thank you
  16. Mauro Parra-Miranda 2013-10-24

    Hello Matej, the priority will be set by the Platform team. Bes,t Mauro
  17. kosso 2013-10-25

  18. Vishal Duggal 2013-10-30

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4889
  19. Wilson Luu 2013-11-13

    Closing ticket as fixed. Verified closing Window inside a NavigationWindow is possible while using the original test case and kosso's test case. Tested on: Titanium Studio, build: 3.2.0.201311122225 SDK build: 3.2.0.v20131113094843 Ti CLI: 3.2.0 (4c816f21d7d9360659d77e9a6a994992ef880b72) Xcode: 5.0.2 Device: iphone 5s (7.0.2)
  20. info@macgrafic.com 2013-11-19

    You can disable the slide effect?
  21. kosso 2013-11-19

    @ info@macgrafic.com - I think you can disable it if you manually set a leftNavButton (to act as your back/window close button) when creating the window. I have custom back buttons in an app and the slide to close doesn't happen.
  22. info@macgrafic.com 2013-11-19

    @kosso ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ AWESOME !!!!!!!!!!!!! I had not thought about it! Thank you so much! But you, Thank you so much! Simple but very effective ... was about to rewrite many lines for this!

JSON Source