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

Windows: Showing an alert dialog when another alert dialog is on screen throws runtime error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.0
    • Fix Version/s: Release 5.0.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Windows 8.1
      Appc CLI (NPM): 4.1.0-1
      Appc CLI (Registry): 4.1.0-4
      Ti SDK: 4.1.0.v20150701120122
      Appc Studio: 4.1.0.201507010234

    • Story Points:
      8
    • Sprint:
      2015 Sprint 14 Windows

      Description

      Description

      When showing an alert dialog if one is already shown then the app will throw a runtime error.

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({
          backgroundColor:'#fff'
      });
       
      var label1 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 1',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      label1.addEventListener('click', function(){
      	alert('hi');
      	setTimeout(function(){
      		alert('hi2');
      	},1000);
      })
       
      win1.add(label1);
       
      win1.open();
      

      Steps to reproduce

      1. Add the above code to an app.js
      2. Build to an emulator/device
      3. Tap the label
      4. Dismiss the alert and the runtime error
      5. Tap the label and then tap the close button

      Actual result

      3. The app will throw a runtime error
      5. No runtime error as the first alert has been dismissed

      Expected result

      A runtime error should not be thrown

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Dawson Toth
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20080
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code