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

LiveView: App events are not cleared on reload

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 3.2.0, Release 3.2.1
    • Fix Version/s: None
    • Component/s: LiveView
    • Environment:

      Latest stable Appcelerator Studio & LiveView
      SDK 3.2.0.GA

      Description

      When a change triggers LiveView to reload the app, app events like Ti.App.resumed or Ti.Gesture.orientationchange are not cleaned up and fire for once each time the app has been reloaded.

      To reproduce

      Run the following app with LiveView enabled and follow the steps on the screen:

      var run = Ti.App.Properties.getInt('run', 0);
      run++;
      Ti.App.Properties.setInt('run', run);
       
      function logEvent(e) {
      	console.log(e.type + ' #' + run);
      }
       
      Ti.App.addEventListener('resumed', logEvent);
      Ti.Gesture.addEventListener('orientationchange', logEvent);
       
      var win = Ti.UI.createWindow({  
          backgroundColor:'#fff'
      });
       
      win.add(Ti.UI.createLabel({
      	text: '1. Change something to trigger LiveView to restart the app.\n'
      		+ '2. Move app to background and then resume.\n'
      		+ '3. Change orientation.\n'
      		+ '4. Check logs.\n'
      		+ '5. Confirm that you see each event triggered twice.'
      }));
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Integration