8

For some reason, I like to use browser's native scrollbar instead of sencha's.

I already set overflow to auto to body, but still don't see scrollbar until I set a fixed height to "ext-viewport" manually in chrome toolbar say 2000px.

it looks like viewport always auto fit to screen size. is there any settings to disable this and enable browser's scrolling?

Thanks in advance.


Updates on May 19 Here's some progress,

  1. In Ext.viewport.Android -> doFixSize will auto fit the viewport to screen size, comment this out and then set/detect fixed
  2. in Ext.viewport.Default, it swallows touchstart/touchmove event so the scrollbar doesn't work, by setting preventPanning/preventZooming to false I can get the scrollbar working. it scrolls much faster than sencha's scrollbar :)

carousel doesn't work well now, investigating...


Updates on June 20

Carousel won't work with native scrollbar in android 4 due to below bug http://code.google.com/p/android/issues/detail?id=19827

with native scrollbar, only touchstart and the first touchmove event is invoked, the subsequent touchmove and touchend are lost so it's not possible to implement carousel without e.preventDefault().

one workround is to listen to touch events, when event target is carousel, then call e.preventDefault to disable native scrollbar....

Rick Li
  • 1,457
  • 2
  • 14
  • 19

1 Answers1

0

try this code

Ext.viewport.setScrollable(false); Ext.viewport.element.dom.childNodes[0].style.overflow = 'scroll';

Naresh Tank
  • 1,569
  • 10
  • 23