X
Tap here to go to the mobile version of the site.

Support Forum

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

Posted

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

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

More Information

FredMcD
  • Top 10 Contributor
3666 solutions 50303 answers

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}

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. ''[https://support.mozilla.org/en-US/kb/forum-response-disable-hardware-acceleration How to disable Hardware Acceleration]'' {web link}

Question owner

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) .. ?? ..

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

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 ..

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

cor-el
  • Top 10 Contributor
  • Moderator
16389 solutions 147861 answers

Helpful Reply

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

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