Open individual
2007-Nov-22 08:01 UTC
IE scroll into view for "autocomplete" has a masive bug.
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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Open individual
2007-Nov-23 13:04 UTC
Re: IE scroll into view for "autocomplete" has a masive bug.
Anybody got any ideas. Still stuck. TIA 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
rjharrod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-25 19:43 UTC
Re: IE scroll into view for "autocomplete" has a masive bug.
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 <michaelschwa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Open individual
2007-Nov-26 10:32 UTC
Re: IE scroll into view for "autocomplete" has a masive bug.
Hi Mr Harrod, Thank you so much for comming back to me. I am still trying to get this to work. It is not working just yet but I hope to get it going if you can send me the control.js you have. I am using prototype 1.5.o as ActiveScaffold requires it. (Nit sure if upgrading to the newer version will mess thigs up there) If I get this autocomplete working eventually I will cry with happiness as I have been stuck forever on it. IE has caused a lot of time wastage as a result. Anyway I hope you get this and thanks for your help once again. Mike On Nov 25, 8:43 pm, "rjhar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <rjhar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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-scri... > > 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 <michaelschwa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---