Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Autocomplete not always working on websites in Firefox (IE or Chrome no problem)

  • 4 replies
  • 4 have this problem
  • 126 views
  • Last reply by cor-el

more options

I have two OpenCart webshops, and in one is autocomplete working but in the other not (in the admin). But in other browsers they work both. Both have the same jquery version scripts. What can be wrong for that one website (it works only once after refershing the url and afterwards the popup is not refreshed anymore) ?

But I have seen when I click another page and return, the autocomplete shows the results, so there is a problem with refreshing the popup .. in the webshop autocomplete works but that is another jquery .. here in admin function(request, response) have been used ..

So in fact it does not react on events in the field (adding more letters etc.), only when I click somewhere on the page and after in the field again (so always first time) .. with debugging I see no ajax calls in the network after field events .. but as I said in another website is it ok, but that is connected to another server ..

I have two OpenCart webshops, and in one is autocomplete working but in the other not (in the admin). But in other browsers they work both. Both have the same jquery version scripts. What can be wrong for that one website (it works only once after refershing the url and afterwards the popup is not refreshed anymore) ? But I have seen when I click another page and return, the autocomplete shows the results, so there is a problem with refreshing the popup .. in the webshop autocomplete works but that is another jquery .. here in admin function(request, response) have been used .. So in fact it does not react on events in the field (adding more letters etc.), only when I click somewhere on the page and after in the field again (so always first time) .. with debugging I see no ajax calls in the network after field events .. but as I said in another website is it ok, but that is connected to another server ..

Modified by Pieter9

Chosen solution

The problem was an error in jquery for autocomplete for OpenCart 2 :

$(this).on('keydown', function() { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } });

Line have to be: $(this).on('keydown', function(event) {

But strange is that IE and Chrome have no problem with that error ..

Read this answer in context 👍 1

All Replies (4)

more options

Many site issues can be caused by corrupt cookies or cache.

  • Clear the Cache and
  • Remove Cookies

Warning ! ! This will log you out of sites you're logged in to. You may also lose any settings for that website.

Type about:preferences<enter> in the address bar.

  • Cookies; Select Privacy. Under History, select

Firefox will Use Custom Settings. Press the button on the right side called Show Cookies. Use the search bar to look for the site. Note; There may be more than one entry. Remove All of them.

  • Cache; Select Advanced > Network.

[v57+] Select Privacy. Across from Cached Web Content, Press Clear Now.

If there is still a problem, Start Firefox in Safe Mode https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

A small dialog should appear. Click Start In Safe Mode (not Refresh). Did this help?

While you are in safe mode;

Try disabling graphics hardware acceleration in Firefox. Since this feature was added to Firefox it has gradually improved but there are still a few glitches.

How to disable Hardware Acceleration {web link}

more options

Thanks for the answer but this did not help, see my updated question.

Other people on the same server have the same problems in Firefox (all have other addons etc.), maybe it has to do something with the server (but only for Firefox) .. ?? ..

Modified by Pieter9

more options

Chosen Solution

The problem was an error in jquery for autocomplete for OpenCart 2 :

$(this).on('keydown', function() { switch(event.keyCode) { case 27: // escape this.hide(); break; default: this.request(); break; } });

Line have to be: $(this).on('keydown', function(event) {

But strange is that IE and Chrome have no problem with that error ..

Modified by Pieter9

more options

On Firefox you always need to pass the event object to the event handler. On IE it is a global window object.