Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6519] Android: Adding a webView to a heavyweight window causes the select list to become unresponsive

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-10T00:20:57.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1
Fix Version/sSprint 2012-01, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsmodule_window, parity, qe-testadded
ReporterJon Alter
AssigneePing Wang
Created2011-12-08T15:39:16.000+0000
Updated2012-03-04T22:09:32.000+0000

Description

Adding a webview (that contains a select list) to a window with the navBarHidden property set (true or false) after the window is open caused the select list to not work. Step 1: run the code below Step 2: click on the select list Step 3: notice that the select does not pop up Step 4: remove the navBarHidden, or add a setTimeout around the add, or put the add in a window open event listener Step 5: run again and notice that the select list works fine.
var mainWindow = Ti.UI.createWindow({
	navBarHidden: true,
});

var wv = Ti.UI.createWebView({
	html: '<select>'+
	  		'<option value="volvo">Volvo</option>'+
	  		'<option value="saab">Saab</option>'+
			'<option value="mercedes">Mercedes</option>'+
			'<option value="audi">Audi</option>'+
		'</select>'
});


mainWindow.open();

// setTimeout(function(){
	mainWindow.add(wv);
// },200);

Workaround

1. do not use a heavyweight window 2. (does not always work) add the webView to the window in a setTimeout 3. (does not always work) add the webView to the window in a window.addEventListener('open',function(){});

Comments

  1. Wilson Luu 2012-01-17

    Closing bug. Verified fix on: SDK build: 1.9.0.v20120117144634 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201131907 OS: Mac OS X Lion (10.7.1) Device: Droid 3 (2.3.4)

JSON Source