# Text\_field\_with\_auto\_complete and Safari browsers

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete-and-safari-browsers/155782>\
**Category:** Rails\
**Created:** [December 16, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-safari-browsers/155782 "2008-12-16T19:18:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [December 16, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-safari-browsers/155782/1 "2008-12-16T19:18:59Z")

</div>

I have a text field with auto complete that allows a user to choose a  
name from the list and when that name is selected that name is taken out  
of the list of available username to select from.

Today I got notification that someone using my app uses Safari and the  
described functionality doesn’t work in Safari. In order to make it work  
I thought I might be able to do some kind of browser detection and then  
have it display a normal dropdown instead of the auto complete, and then  
I found that won’t work because that list is just to big to be displayed  
in a normal drop down, which leads me back to the auto complete.

Has anyway got text\_field\_with\_auto\_complete to work in a Safari  
browser?

Thanks,

-S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [December 16, 2008, 11:57pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-safari-browsers/155782/2 "2008-12-16T23:57:46Z")

</div>

What I have found out is that when my text\_field\_with\_auto\_complete is  
wrapped within a form\_remote\_tag it doesn’t work, however, when I use a  
normal form\_tag is works. The problem is that I need the functionality  
that the form\_remote\_tag gives me. Has anyone else encountered this  
problem and could you share on how to fix it.

Thanks,

-S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [December 17, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-safari-browsers/155782/3 "2008-12-17T23:04:59Z")

</div>

I am still having this problem, however, now the IDE I use (Aptana)  
seems to think that I am missing some kind of tag and gives me a  
“illegally formed XML” error. I know this isn’t a forum for Aptana but I  
am not entirly convinced that there is in fact an error since, as far as  
I can see, all tags are closed and created properly. My problem and this  
error started when I started messing around with this auto\_complete  
field and I am pretty sure it is related.

What is happening is that the auto\_complete field creates a drop-down as  
I type but does not select anything when I click on it. Also, in another  
part of my app I have an auto\_complete field that work wonderfully -  
this is in the Safari browser. My question is has anyone experienced any  
kind of strange behavor in the Safari browser concerning auto\_complete  
field? And how did you solve them?

I should also add that the two fields mentioned before seemed to be  
formatted exactly the same so it is a bit of a mystery to me why one  
works and the other does not.

Thanks,

-S
