I have the same issue as you - a div w/ overflow:auto that needed
scrolling but scrollIntoView was causing my parent iFrame to shift.
You'll need scriptaculous, but this should help you:

http://elia.wordpress.com/2007/01/18/overflow-smooth-scroll-with-scriptaculous/

Then, I changed the markNext / markPrevious methods (the moveTo method
is in the url above):

        markPrevious: function() {
            if(this.index > 0) this.index--
            else this.index = this.entryCount-1;

            pos = Position.page(this.getEntry(this.index));
            elPos = Position.page(this.element);
            pos_h = pos[1];
            elPos_h = elPos[1];

            list_h = this.update.getHeight();

            if ( pos_h > (elPos_h + list_h) || pos_h < elPos_h )
                moveTo(this.update, this.getEntry(this.index) );
        },

        markNext: function() {
            if(this.index < this.entryCount-1) this.index++
            else this.index = 0;

            pos = Position.page(this.getEntry(this.index));
            elPos = Position.page(this.element);
            pos_h = pos[1];
            elPos_h = elPos[1];

            list_h = this.update.getHeight();

            if ( pos_h > (elPos_h + list_h) || pos_h < elPos_h )
                moveTo(this.update, this.getEntry(this.index) );
        }

- Bob

On Nov 22, 3:01 am, Open individual <[EMAIL PROTECTED]> wrote:
> Hi everyone
>
> After sitting on this problem for too long I decided to re-post the
> problem.
>
> I have the problem that the minute the user scrolls up or down with
> the down or up keyboard key then IE scrolls the whole page.
> Firefox does not and works correctly.
>
> I unfortunatly need to use the scroll because I have to display a
> large amount of data. Therefore commenting scroll into view will not
> do.
>
> This is what I have in my controls.js
>
> ################################################################################
>
>   render: function() {
>     if(this.entryCount > 0) {
>       for (var i = 0; i < this.entryCount; i++) {
>         this.index==i ?
>           Element.addClassName(this.getEntry(i),"selected") :
>           Element.removeClassName(this.getEntry(i),"selected");
>         if (this.index == i) {
>           var element = this.getEntry(i);
>           element.scrollIntoView(false);
>         }
>       }
>       if(this.hasFocus) {
>         this.show();
>         this.active = true;
>       }
>     } else {
>       this.active = false;
>       this.hide();
>     }
>   },
>
> ################################################################################
>
> This is what I have in my CSS
>
> ################################################################################
>
>         <style type="text/css">
>                         div.auto_complete {
>                           height: 100px;
>               width: 100px;
>               background: #fff;
>                           overflow: scroll;
>                           border: 1px solid #888;
>             }
>             div.auto_complete ul {
>               margin:0;
>               padding:0;
>               width:100%;
>             }
>             div.auto_complete ul li {
>               margin:0;
>               padding:3px;
>             }
>             div.auto_complete ul li.selected {
>               background-color: #ffb;
>                           cursor:pointer;
>             }
>             div.auto_complete ul strong.highlight {
>               color: #800;
>               margin:0;
>               padding:0;
>             }
>
> </style>
>
> ################################################################################
>
> Please can anyone help me with this scroll problem in IE.
> Thank you for any time and effort as I am really stuck.
>
> Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to