Hi -
I’m having a really weird problem with text_field_with_auto_complete.
I use this for looking up tags. When I type in the beginning of a
tag, the drop down appears, and sometimes the contents of the
truncated. I rewrote a debug version of auto_complete_result to test
this out:
def auto_complete_result(entries, field, phrase = nil)
return unless entries
answer ="
- "
- #{entry[field]} - debug "
- economy - debug
- economy - deb
for entry in entries
answer+="
end
answer +="
- "
end
This only seems to happen when I have one and only one matching entry
in the lookup table. So, if i type in “eco” for example, and the only
matching tag in the table is ‘economy,’ then I expect this:
But, what I get instead is
The inner contents are truncated. It’s so weird. I’ve confirmed that
the actual html has the truncated entry.
Here’s where it gets weirder. It only happens on Firefox. On ie, it
does not truncate. Again, it only happens on my host, not when i run
a local server. I’ve tried removing the stylesheets and use the
default styling, same problem.
The only difference as far as I can tell from my dev machine and host
machine is running ruby 1.8.5, and my local machine is running 1.8.6.
Has anyone seen this weird behavior before or have any suggestions on
how to approach it?
Thanks,
Dino