yep i've had this problem and came up with a solution, but it requires some
tweaking;

call the following code whenever the view is resized or focus is changed -
you'll have to hook the onblur handler of your input elements and set
__self.focussedElement to it; theres no DOM way that i found to do this

var mw = <scrollArea.offsetWidth>
var mh = <scrollArea.offsetHeight>

            var $scroller = $('#scroller.jScrollPane', __self.html);
            var t = parseInt($('#scroller.jScrollPane',
__self.html).get(0).style.top);
            $scroller.jScrollPane({showArrows:true, scrollbarWidth: 15,
arrowSize: 16});
            var $container = $('.jScrollPaneContainer', __self.html);
            $container.css ({ width : (mw - 1) + 'px', height : (mh-2)+'px'
});
            if (__self.focussedElement) {
                var e = __self.focussedElement.offsetParent, tt=0;
                while (!jQuery(e).is('#scroller.jScrollPane')) {
                    tt -= e.offsetTop;
//                    mb.reportToDebugger
(e.tagName+'#'+e.id+'.'+e.className+'='+e.offsetTop+'
== '+t);
                    e = e.offsetParent;
                }
                if (tt>t) t=tt;
            }
            if ($container[0].scrollTop>0) {
                t -= ($container[0].scrollTop + 10);
                $container[0].scrollTop = 0;
            };
            $scroller.css ({  width : (mw - 15 - 10)+'px', height:
(mh-2)+'px'});
            if ($scroller[0].scrollTo) {
                $scroller[0].scrollTo (-1*t);
            };
            $('.jScrollPaneTrack', __self.html).css ({ height : (mh-34)+'px'
});


On Fri, Aug 22, 2008 at 2:32 PM, jscharf <[EMAIL PROTECTED]> wrote:

>
> hello,
>
> i got a problem while loading a form into a container using
> jscrollpane to handle overflow.
>
> First time it's loaded jscollpane reacts like it should do, but if u
> use the tab key to go through inputs and textfields, jscrollpane
> disappears if the form is much more longer than the div container.
>
> does anyone of you have/had the same problem and a solution for this
> issue?
>
> Please help me, thnx in advance
>

Reply via email to