Issue 28: Does not work on Bada
Status:  Accepted
Owner:
Reported by jerome.k...@gmail.com, Sep 21, 2010
What steps will reproduce the problem?
1. Running examples/simple/index.jsp on Bada

What is the expected output? What do you see instead?
bug : There is no scroll. All the page is fixed.


What version of the product are you using? On what operating system?
- iScroll 3.6
- BADA os 1.0

Sep 21, 2010
Project Member #1 mat...@gmail.com
I'd really love to add Bada compatibility, but I don't have the device to test to. I'm already buying an avg of 6 devices/year...
Status: Accepted
Owner: matt3o
Labels: -Priority-Medium Priority-Low
Sep 21, 2010
#2 jerome.k...@gmail.com
Add var isBada :-)

I think it's better to use navigator.userAgent instead of appVersion cause in bada, appVersion only return '5.0'.

isIphone = (/iphone/gi).test(navigator.userAgent),
isIpad = (/ipad/gi).test(navigator.userAgent),
isAndroid = (/android/gi).test(navigator.userAgent),
isBada = (/bada/gi).test(navigator.userAgent),
isTouch = isIphone || isIpad || isAndroid || isBada,
Sep 21, 2010
Project Member #3 mat...@gmail.com
I prefere to use appVersion on devices that support it. Actually if the device supports touches and webkitCSSMatrix we don't care of the device name.
Sep 21, 2010
#4 jerome.k...@gmail.com
You can detect if an event is present without browser sniffing (it avoids having problems with new browsers).

There is a good article : http://perfectionkills.com/detecting-event-support-without-browser-sniffing/

You can do somthing like that :


function isEventSupported(eventName) {
	var el = document.createElement('div');
	eventName = 'on' + eventName;
	var isSupported = (eventName in el);
	if (!isSupported) {
		el.setAttribute(eventName, 'return;');
		isSupported = typeof el[eventName] == 'function';
	}
	el = null;
	return isSupported;
}

var isTouch = isEventSupported('touchstart'); // no need to detect browser
Sep 21, 2010
Project Member #5 mat...@gmail.com
Unfortunately testing for touch events is not always the best way, that's why I'm testing for device name, but checking for a serie of supported functionalities could work.