Hi Everyone. I have got a problem however in both IE and Firefox as the drop down autosuggest scrolls the page down to the element only when the up arrow is pressed for autosuggest. Here is a detailed example. When I have <%= text_field_with_auto_complete :product, :colour %> in my product _form.rhtml override... ... and in my product controller I have auto_complete_for :product, :colour This gives the desired drop down. (save and edit transactions not working just yet but can easily be resolved) My problem then is this. When the user types text into the colour text field such as "vio" for example then magic stuff the auto suggest below displays "daytona violet", "violet", "dark violet" ... This is simply magic and works. So the user presses the down arrow on his keyboard and arrives at "dark violet" but then presses the up direction button because he rather wants "daytona violet" only to find that upon pressing the up arrow on their keyboard the page scrolls down to that element. This is my only problem at the moment. This is a must have for 99% of the applications, to speed up and aid in data entry. Can any of the members or gurus out there tell me why this is happening and how to resolve it? I have been stuck on this for a week. Regards Uncle 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 -~----------~----~----~----~------~----~------~--~---
Take a look at this http://dev.rubyonrails.org/ticket/9418 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the help. You pointed me in the right direction and after another 6 hours of debugging and going through some other tickets I found what I was looking for. This eventually solved it. In the controls.js do the following and it will work for both IE and Firefox. markPrevious: function() { if(this.index > 0) this.index-- else this.index = this.entryCount-1; pos = Position.page(this.getEntry(this.index)); if (pos[0] < 0 || pos[1] < 0 || pos[0] > window.innerWidth || pos[1]> window.innerHeight) this.getEntry(this.index).scrollIntoView(false);}, markNext: function() { if(this.index < this.entryCount-1) this.index++ else this.index = 0; pos = Position.page(this.getEntry(this.index)); if (pos[0] < 0 || pos[1] < 0 || pos[0] > window.innerWidth || pos[1]> window.innerHeight) this.getEntry(this.index).scrollIntoView(false);}, --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---