devbridge / jQuery-Autocomplete

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields
https://www.devbridge.com/sourcery/components/jquery-autocomplete/
Other
3.56k stars 1.66k forks source link

Back button issue #393

Closed orrd closed 7 years ago

orrd commented 9 years ago

When hitting the browser back button any values entered by the user into the debridge autocomplete input fields are lost. This issue was previously submitted as issue #334, but it was closed because I think tkirda misunderstood what problem they were describing.

When you use the back button to go back to a form, as long as the page is cached, normally the form fields are displayed with the same values you entered intact. But any fields that use devbridge autocomplete lose the values that were entered by the user, and instead it shows the original field values instead.

It turns out jQuery UI's autocomplete has the same issue, and I found a blog post that explains the problem and a solution. The problem is that autocomplete sets autocomplete=off. That's what's causing Firefox and Chrome to not correctly remember the user's input.

Possible solutions/workarounds: Maybe make devbridge autocomplete not set autocomplete=offat all (if it doesn't really have to be turned off)? Or at least make that an option. If the web browser autocomplete is a problem, maybe just turn it off when the field is selected, but turn it back on when the field loses focus?

Edit:

mamcx commented 8 years ago

+1

I hit the same issue

tkirda commented 7 years ago

This will not be fixed. Use jQuery autocomplete if this still an issue.