Domanda

Sto scrivendo un estensione Chrome.

Quando si fa clic sul pulsante di azione del browser nel primo tempo -. Tutto va bene

Quando si fa clic sul pulsante di azione del browser per la seconda volta, dopo alcuni minuti di non clic su di esso, ci vuole più di 10 secondi finché non viene visualizzato il popup.

Ho provato commentando tutti i metodi periodiche sullo sfondo e tutti i metodi in caso di carico del pop-up, ma ancora non mostrato immediatamente.

qualche suggerimento?

È stato utile?

Soluzione

I had a similar issue with the popup when I was adding an iframe to the popup. Chrome would wait with showing the popup until that iframe was loaded.

For me the fix was wrapping the code that added the iframe to the HTML in:

setTimeout(function(){
    // Code here
},0);

This way Chrome showed the popup first, after which it begin with loading the iframe.

Maybe you have a similar problem?

Altri suggerimenti

i have seen this behavior before when you have a long running ajax call that you are doing on popup load.. hard to tell further without code samples or description of what you are doing

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top