davebalmer / jo

Jo (0.5.0) is a thin (~16K) candy shell for making HTML5 apps. Jo works with: PhoneGap, Chrome, Safari, Opera, FireFox, iOS, Android, BlackBerry 10, Tizen, & Windows Phone 8+. Features include skinnable UI widgets, a clean event model and a light data layer.
MIT License
1.2k stars 180 forks source link

Scroll doesn't work into the Palm Web browser #22

Closed rochejul closed 10 years ago

rochejul commented 13 years ago

Hi,

You framework is really awesome !! However, I see a big issue with your scroller into the Palm WebOS browser (1.4.5 and 2.0 beta).

WebOS overrides the scroll management. So, if you have some iframes or some elements with overflow: scroll, you can scroll in these. I try for another application to do a coverflow with finger motion. But WebOS raises mouse events a mouse click (mousedown is called only when you click...). In WebOS application, the mouse events are correclty called.

I think the only way will be to use the touch events (touchstart, touchmove ....) that Webkit provides.

What do you think ?

Regards

Julien

rochejul commented 13 years ago

yerk, touch events and even HTML5 drag don't work into the Palm WebOS browser (the native scroller seems to prevent the actions).

That means we can't use the jscroller and that the bottom bar must be managed in another way. Otherwise, the content can be masked.

Cheers

Julien

davebalmer commented 13 years ago

So I happen to work at Palm, and a bug has been filed about this. :) Meantime, unfortunately, for the webOS browser (only; webOS apps work fine), the strategy would be to skip the scroller and use the full page scrolling built into the browser. Hopefully this issue will be fixed in the browser soon. :)

davebalmer commented 12 years ago

A fix for this is in the works, more details when the webOS 3.0 SDK is out of NDA.

abackstrom commented 12 years ago

With the release of the HP TouchPad, is that SDK now out of NDA?

RLovelett commented 12 years ago

webOS 3.0 is now out of the NDA

davebalmer commented 12 years ago

So here's the scoop with the initial release of webOS 3.0 browser events: they will pass through, but 1) the proper meta tags need to be used; 2) the page needs to be within the boundary of the browser window; 3) they come through as mouseMove, not touchMove (even though touchMove is actually supported in the webkit itself, I know, it's complicated). I'll be playing with Jo this weekend, I think at a minimum I need to add the TouchPad's new agent string (hpwOS or something).

davebalmer commented 12 years ago

And yes, webOS 3.0 SDK is out of NDA :) http://developer.palm.com

davebalmer commented 12 years ago
  1. Browser user agent string is "hpwOS", which I added to the repo here.
  2. I use these meta tags:

  3. If you're using joScreen as your main container, it'll meet the "have to keep your page within the browser window" requirement. Otherwise, make a main container for your content, fixed position, recommend doing top: 0; left: 0; bottom: 0; right: 0; for it in CSS.
  4. One other bit of magic, sadly, is you'll have to tell Jo that if you're in a webOS browser (instead of webOS app), that it needs to use mouse* events (at least for now). I'm checking in changes to jo/samples/test.js to illustrate browser sniffing to make that work. Here's the line though:

    if (jo.matchPlatform("hpwos") && typeof PalmSystem === 'undefined')
       joEvent.touchy = false;

Called after jo.load() and before you setup any widgets or event handlers.

davebalmer commented 12 years ago

Going to add this to the lib as well, but until then, feel free to fiddle with the above.