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

iOS: WebView: fires load event multiple times

    Details

      Description

      I am using the following code to listen for the load event of a WebView:

         webView.addEventListener('load', function(evt) {
              mapView.evalJS("alert('" + evt.url + "');");
          });</code>
      

      When running this in the iPhone simulator, the load event appears to be getting fired 10 times. This listener is triggered 10 times and thus I get 10 alert's that pop up after the WebView has loaded.

      Update: The original PR created a side effect of if the remote webpage loaded uses JavaScript to POST a form to itself (i.e. the same URL), the WebView load event never fires.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                srahim Sabil Rahim
                Reporter:
                timothyf timothyf
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration