betelgeuse
betelgeuse

Reputation: 160

Dojo mobile show scroll bar

Is it possible to show the scroll bar in dojox mobile when the page is viewed from desktop browser?

This is my scrollablePane in which i want to show the scrollbar

<div id="resultViewScrollPane" data-dojo-type="dojox/mobile/ScrollablePane">
      <div id="resultViewContentPane" data-dojo-type="dojox/mobile/ContentPane"></div>
 </div>

Upvotes: 0

Views: 305

Answers (1)

James Irwin
James Irwin

Reputation: 1191

To show the desktop browser scrollbar, you can override the overflow: hidden statement in dojox/mobile/themes/*/ScrollablePane.css in your own stylesheet:

.mblScrollablePane {
    overflow: auto !important;
}

However, I don't think this is what you're looking for, as the client scrollbar seems to be pretty confused, because ScrollablePane is using webkit transforms to emulate scrolling in an inner div (see comments near top of dojox/mobile/scrollable.js). Try the above to see what I mean.

If you're just looking to keep dojox/mobile's custom scrollbar visible, you can override hideScrollBar() in scrollable.js, though it won't act like a normal desktop scrollbar (can't click and drag it, etc). I'd suggest not using a dojox/mobile ScrollablePane when the page is viewed on a desktop, and inserting a different widget such as a regular ContentPane.

Upvotes: 0

Related Questions