Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix favicon disappearing in Firefox when setting location.hash #218

Merged
merged 2 commits into from

3 participants

@phpfaber

Fix favicon disappearing in Firefox when setting location.hash
See bug #3448485

Eugene Golovan Fix favicon disappearing in Firefox
Fix favicon disappearing in Firefox when setting location.hash
See bug #3448485
fa07815
@roccivic roccivic was assigned
@Chanaka Chanaka merged commit 4c59ac5 into from
@Chanaka

Merged #218
Thanks phpfaber for work on this

@phpfaber

Chanaka, thanks a lot for such great app!
The bug can be closed now https://sourceforge.net/p/phpmyadmin/bugs/3851/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. Fix favicon disappearing in Firefox

    Eugene Golovan authored
    Fix favicon disappearing in Firefox when setting location.hash
    See bug #3448485
Commits on Mar 30, 2013
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +11 −0 js/ajax.js
View
11 js/ajax.js
@@ -671,6 +671,15 @@ AJAX.setUrlHash = (function (jQuery, window) {
*/
var userChange = true;
+ // Fix favicon disappearing in Firefox when setting location.hash
+ function resetFavicon() {
+ if (jQuery.browser.mozilla) {
+ // Move the link tags for the favicon to the bottom
+ // of the head element to force a reload of the favicon
+ $('head > link[href=favicon\\.ico]').appendTo('head');
+ }
+ }
+
/**
* Sets the hash part of the URL
*
@@ -688,6 +697,7 @@ AJAX.setUrlHash = (function (jQuery, window) {
userChange = false;
if (ready) {
window.location.hash = "PMAURL-" + index + ":" + hash;
+ resetFavicon();
} else {
savedHash = "PMAURL-" + index + ":" + hash;
}
@@ -709,6 +719,7 @@ AJAX.setUrlHash = (function (jQuery, window) {
if (savedHash != "") {
window.location.hash = savedHash;
savedHash = "";
+ resetFavicon();
}
// Indicate that we're done initialising
ready = true;
Something went wrong with that request. Please try again.