Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-7240

Android: OptionDialog can't be called several times after a tabgroup is opened and closed.

    Details

      Description

      Problem Description

      Ti.UI.OptionDialog can be called multiple times in SDK 1.8 without problems, but not after a TabGroup is opened and then closed. Happening on both v8 and rhino.

      Steps to reproduce

      1. Add this code to a new mobile project

      var w = Ti.UI.createWindow({
      	backgroundColor: 'red',
      	fullscreen: false,
      	exitOnClose: true
      });
       
      var b = Ti.UI.createButton({
      	height: 50,
      	title: 'click'
      });
       
      b.addEventListener('click', function(e) {
      	var optDlg = Ti.UI.createOptionDialog({
      		title: 'choose',
      		options: ['open', 'dismiss']
      	});
       
      	optDlg.addEventListener('click', function(e) {
      		if (e.index===0) {
      			var t = Ti.UI.createTabGroup(),
      				w1 = Ti.UI.createWindow({
      					title: 'blue',
      					backgroundColor: 'blue'
      				}),
      				b1 = Ti.UI.createButton({
      					title: 'close'
      				}),
      				t1 = Ti.UI.createTab({
      					title: 'blue',
      					window: w1
      				});
       
      			w1.add(b1);
      			b1.addEventListener('click', function(e){
      				t.close();
      			});
      			t.addTab(t1);	
      			t.open();
      		}
      	});
       
      	optDlg.show();
      	Ti.API.info('must be showing dlg');
      });
       
      w.add(b);
      w.open();
      

      2. Click the button
      3. Select something.
      4. Close
      5. click open again

      ACTUAL RESULTS

      The openDialog doesn't open

      EXPECTED RESULTS

      openDialog should work.

      MORE INFO

      It's working fine in 1.7.5

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                mpmiranda Mauro Parra-Miranda
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code