laviastar / iscroll-js

Automatically exported from code.google.com/p/iscroll-js
MIT License
2 stars 2 forks source link

Does not work on Bada #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by jerome.k...@gmail.com on 21 Sep 2010 at 9:08

GoogleCodeExporter commented 9 years ago
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...

Original comment by mat...@gmail.com on 21 Sep 2010 at 9:17

GoogleCodeExporter commented 9 years ago
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,

Original comment by jerome.k...@gmail.com on 21 Sep 2010 at 12:45

GoogleCodeExporter commented 9 years ago
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.

Original comment by mat...@gmail.com on 21 Sep 2010 at 1:09

GoogleCodeExporter commented 9 years ago
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

Original comment by jerome.k...@gmail.com on 21 Sep 2010 at 1:56

GoogleCodeExporter commented 9 years ago
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.

Original comment by mat...@gmail.com on 21 Sep 2010 at 2:06