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

Android: Webview: Webview with HTML property having HTML content does not reload

    Details

      Description

      A webview with HTML property (containing the HTML content of the webview) loads successfully but does not reload.

      The behavior occurs since 2.0.1. This worked fine on 1.8.2

      Steps to reproduce:
      1. Create an application with code below
      2. Launch app on android device
      3. Click on "Remove and release and add webview" button

      Actual: After step 2, the webview launches successfully
      After step 3, the webview does not reload

      Expected: The webview with HTML content should reload.

      var _window = Ti.UI.createWindow({
      	backgroundColor:'#000'
      })
       		var webview=Ti.UI.createWebView({
      			//url:'http://www.google.com',
      			html:'<html><body>test</body></html>',
      			top : 0,
      			height : 200
      		});
      		
      		webview.addEventListener('load', function() {
      			alert('The webview is loaded!');
      		});
       
      		var b2 = Ti.UI.createButton({
      			title : "remove and release and add webview",
      			top : 280
      		});
      		b2.addEventListener("click", function() {
      			_window.remove(webview);
      			webview.reload();
      			_window.add(webview);
      		});
       
      _window.add(webview);
      _window.add(b2);
      _window.open();
      

        Attachments

        1. app.js
          3 kB
        2. test.html
          0.2 kB
        3. test2.html
          0.2 kB
        4. webview.html
          0.2 kB

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                ssekhri Satyam Sekhri
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code