Internet Explorer 9 has issues applying keyboardType to Ti.UI.TextField
When running a simple app with a textfield setting the keyboardType property, the browser has an error:
Error: Invalid argument this._field.type = t;
It does not crash for every keyboardType
Crashes using:
Ti.UI.KEYBOARD_EMAIL
Ti.UI.KEYBOARD_NUMBER_PAD
Ti.UI.KEYBOARD_PHONE_PAD
Ti.UI.KEYBOARD_URL
Do not crash:
Ti.UI.KEYBOARD_ASCII
Ti.UI.KEYBOARD_DECIMAL_PAD
Ti.UI.KEYBOARD_DEFAULT
Ti.UI.KEYBOARD_NAMEPHONE_PAD
Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION
Steps to reproduce:
1. Create a mobileweb project with the code below in app.js
2. run on Internet Explorer 9
3. Use above keyboardType values
a. Ti.UI.KEYBOARD_EMAIL
b. Ti.UI.KEYBOARD_NUMBER_PAD
c. Ti.UI.KEYBOARD_PHONE_PAD
d. Ti.UI.KEYBOARD_URL
4. notice the browser gives an error and stops the app
Code:
var win = Ti.UI.createWindow({
backgroundColor:'#555'
});
var textfield = Ti.UI.createTextField({
width: 100,
height: 100,
fontSize: 14,
keyboardType: Ti.UI.KEYBOARD_URL //REPLACE WITH OTHER VALUES a,b,c,d
});
win.add(textfield);
win.open();
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2692
Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120810080115 Win 7 - IE 9