Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6663

Statusbar plugin may cause cordova not to load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.4.0
    • None
    • iOS 7.1 on iPhone 5, Xcode 5

    Description

      Found this while researching symptoms like those in CB-5488, where Cordova was not finding "document.body" and not initializing or firing "deviceready". When using the Statusbar plugin on iOS for its ability to "overlaysWebView=false", found that when including JQuery in those same pages, Cordova would intermittently fail to load. Used the Mac Safari "Developer" tool option debugger to step through on the device and saw the error was in cordova.js's operating on a null "document.body". The call stack pointed to statusbar.js.
      I believe this is due to Statusbar's Javascript calling exec() before "device ready". I was able to do some testing and if I deferred this exec() call until after "deviceready", the error disappears.

      If I can figure out how, I might be able to propose my changes properly. They only were about 3 lines of Javascript, but I need to get set up to test, etc.

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              tsanidas Tom Sanidas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: