I am developing a web2py app on Mac OS X Leopard, to have the
autocompleteWidget work properly I had to change the _onblur
attribute's delay from 3000 to 300, otherwise the drop box containing
the options would cover the submit button/other form fields for too
long.

Today I tested the autocompleteWidget on a Windows computer and
discovered that the change mentioned above causes some unexpected
behaviour in IE.

This is the form:

form=SQLFORM.factory(Field('city',requires=IS_NOT_EMPTY(),widget=SQLFORM.widgets.autocomplete(request,db.address.city,min_length=2)))

When I start typing a city name the field looses focus after typing
the second letter, and I have to click the field to give it back its
focus to be able to type the next letter, this is a repetitive
pattern. So, it seems like the field looses focus _onkeyup.
Furthermore the drop down list showing the options fades out so fast
the user doesn't have the time to select one of the options.

Changing the _onblur attribute's delay back to 3000 solves the problem
on the Windows computer, but re-introduces the problem on the Mac.

I don't understand why _onkeyup and_onblur seem to interfere with each
other and I can't account for the difference in behaviour between Mac
and Windows when it comes to the delay.



Is there a way solve this problem?

Annet.

Reply via email to