Skip to content

Conversation

@pupi1985
Copy link
Contributor

@ProThoughts
Copy link
Contributor

cool! thanks for the quick fix.

@svivian
Copy link
Collaborator

svivian commented Mar 1, 2018

We use absolute positioning so that the image is pre-loaded and appears instantly when doing an action (to show something is happening). Unfortunately browsers don't load images inside display:none, so on a slow connection it can take a second for the icon to display, which defeats the purpose.

visibility:hidden does load the image but it takes up space on the page. We can add position:absolute; top:0 but we may be back to square one with that.

I don't think pre-loading via JS is feasible either as the image URL is part of the CSS (different themes have different loading icons).

@pupi1985
Copy link
Contributor Author

pupi1985 commented Mar 2, 2018

I can confirm the browser caching issue. I amended the commit. The solution is overkill on purpose: to avoid any theme CSS change to incidentally make the hidden element visible.

@svivian svivian merged commit 6965766 into q2a:dev Mar 3, 2018
@svivian
Copy link
Collaborator

svivian commented Mar 3, 2018

OK thanks, hopefully this stops the bogus malware alert.

@ProThoughts
Copy link
Contributor

This is working, no malware alert now. I added this patch on below site.
https://sitecheck.sucuri.net/results/meta.question2answer.info

@ProThoughts
Copy link
Contributor

@svivian , I feel you should release q2a v1.8.1 because of this patch. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants