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

Ti.Network.getOnline() messed up unless consoled before

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Simulator

      Description

      Just create the sample hello world app in appcelerator and use the code below in the index.js file.

      function doClick(e) {
      	console.info('Ti.Network.online: ' + Ti.Network.getOnline());
      	if (Ti.Network.getOnline()) alert($.label.text);
      }
      $.index.open();
      

      Start the app in an iOS simulator, click 'Hello, World'. The alert should pop up. Then turn off your wifi on your computer, the alert shouldn't pop up. Then turn your wifi back on. If the console.info is uncommented then the alert will work properly. If there is no console then the alert will not pop up.

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              josh.mocek josh.mocek
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Source Code