Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9478] iOS:WebView - WebView doesn't render correctly when Window with Webview is closed and reopened.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-03T02:32:30.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0
ComponentsiOS
Labelsapi, module_webview, qe-ios060112, qe-testadded
ReporterNeha Chhabra
AssigneeNeeraj Gupta
Created2012-06-11T05:01:33.000+0000
Updated2012-07-03T14:39:33.000+0000

Description

WebView doesn't render correctly when Window with Webview is closed and reopened. This is not a regression.This occurs as far as 1.8.2. Steps to Reproduce: 1. Install the app on your device and launch it. 2. Press Open Webview button. 3. Press close button. 4. Click on Open WebView Button again. app.js
var win = Ti.UI.createWindow({
    backgroundColor : 'blue'
})
var button = Ti.UI.createButton({
    title : 'Open WebView'
});


    var browser = Ti.UI.createWebView();
    var html = '<html><body><select><option value="Feedback">Feedback</option><option value="Bug">Bug</option></select></body></html>';
    button.addEventListener('click', function() {
    var w = Ti.UI.createWindow({
        fullscreen : true
    });

    var wButton = Ti.UI.createButton({
        title : 'Close',
        bottom : 0,
        right : 0,
        height : '10%',
        width : '20%'
    });

    wButton.addEventListener('click', function() {
        //w.remove(browser)
        //browser=null;
        //browser = Titanium.UI.createWebView();
        w.close();
    });

    w.add(browser);
    w.add(wButton);
    w.open();
    browser.html = html;

});

win.add(button);
win.open();
Actual Result: After step 4,the WebView doesn't opens up correctly and it shows the first window. This happens only when WebView is opened for the second time otherwise it works properly. Expected Result: After step 4,the webview should opens up correctly everytime it is clicked.

Comments

  1. Vishal Duggal 2012-06-22

    Probably fixed by the fix for TIMOB-9359/TIMOB-9527
  2. Tamila Smolich 2012-06-26

    Closing as fixed. Tested and verified with: Titanium Studio, build: 2.1.0.201206251749 Titanium SDK: 2.1.0.v20120626104306 Device: iPad 3rd gen (5.1.1)
  3. Neha Chhabra 2012-07-03

    Reopening to update labels.

JSON Source