Closed
Bug 519028
Opened 15 years ago
Closed 9 years ago
changed location.hash leads to tab favicon disappearance
Categories
(Firefox :: General, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 408415
People
(Reporter: gessos.paul, Unassigned)
References
()
Details
(Keywords: testcase, Whiteboard: [sf-hackweek])
Attachments
(1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Where is the icon, left in the location bar?
Sample page:
---------------------------------------------
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml"/>
<link rel="icon" href="favicon.png" type="image/x-icon"/>
<link rel="shortcut icon" href="favicon.png" type="image/x-icon"/>
</head>
<body>
<script>
location.hash = 'crapy';
</script>
</body>
</html>
---------------------------------------------
Reproducible: Always
I can confirm this.
The favicon disappears if you change location.hash, from a call AFTER the <link "shortcut icon" /> tag.
(A click on <a onclick="location.hash='crapy';"> or <input type="button" onclick="location.hash='crapy';" /> will not hide the favicon.)
This will hide the favicon:
---------------------------------------------
<html>
<head>
<link rel="shortcut icon" type="image/ico" href="dir/favicon.png" />
<script> location.hash='crapy'; </script>
</head>
</html>
---------------------------------------------
This will not hide the favicon:
---------------------------------------------
<html>
<head>
<script> location.hash='crapy'; </script>
<link rel="shortcut icon" type="image/ico" href="dir/favicon.png" />
</head>
</html>
---------------------------------------------
Tested under Ubuntu 9.10, Firefox 3.5.9
Comment 2•14 years ago
|
||
This sounds like a dupe of bug 420605.
Comment 3•14 years ago
|
||
I can reproduce this bug with Firefox 3.6.12 running on Windows 7 Enterprise (64bit).
However to reproduce the bug, the HTML document needs to include a stylesheet link in the head section AND the stylesheet must exist.
The following hides the favicon for me:
---------------------------------------
<html>
<head>
<link rel="shortcut icon" type="image/ico" href="favicon.png" />
<link href="foo.css" type="text/css" rel="stylesheet" />
<script>
location.hash='bogus';
</script>
</head>
</html>
---------------------------------------
The following does not hide the favicon:
---------------------------------------
<html>
<head>
<link rel="shortcut icon" type="image/ico" href="favicon.png" />
<script>
location.hash='bogus';
</script>
</head>
</html>
---------------------------------------
Comment 4•14 years ago
|
||
This is not a dupe of #420605.
Here is a test case: http://jsbin.com/ulaxo4
Updated•14 years ago
|
Version: unspecified → 3.6 Branch
Comment 5•14 years ago
|
||
I can confirm this and have a reproducible test case in work code. It still happens in Firefox 4; it appears to only happen if the hash to be set is not in the document at the moment of setting it (we have this to work around some other browser bug, I forget which at the moment).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•14 years ago
|
||
(I'm on 64-bit Windows 7 here, but I think it also happens on OS X.)
Version: 3.6 Branch → 4.0 Branch
Comment 8•13 years ago
|
||
Very good workaround can be found here: http://stackoverflow.com/a/4630726/684229
And yes, Firefox 9.0.1 still has the problem (Windows XP, 32 bit).
Comment 10•12 years ago
|
||
Still seeing this behavior in v20.0a2.
Comment 11•11 years ago
|
||
Firefox 23 also still affected (if it makes sense to report this as apparently the bug hasn't been fixed yet).
Comment 12•11 years ago
|
||
+1. Still a problem on Firefox 24 (Linux, 64 bit.) We only see the problem when going from no hash to adding a hash, but we used the detach/re-attach workaround in http://stackoverflow.com/a/4630726/684229 on all hash changes just to be safe.
Comment 13•11 years ago
|
||
I can reproduce in 26.0a2, OS X.
OS: Windows XP → All
Hardware: x86 → All
Version: 4.0 Branch → 26 Branch
Comment 14•11 years ago
|
||
Updated•11 years ago
|
Attachment #8340226 -
Attachment mime type: text/plain → text/html
Comment 15•11 years ago
|
||
Comment on attachment 8340226 [details]
Non-working testcase reduced too much from http://jsbin.com/ulaxo4
It's not reproducible without the additional scripts it seems.
Attachment #8340226 -
Attachment description: Testcase reduced from http://jsbin.com/ulaxo4 → Non-working testcase reduced too much from http://jsbin.com/ulaxo4
Attachment #8340226 -
Attachment is obsolete: true
Updated•11 years ago
|
Component: Location Bar → General
Summary: change location.hash leads to location bar icon disappearance → changed location.hash leads to tab favicon disappearance
Updated•10 years ago
|
Flags: firefox-backlog+
Updated•10 years ago
|
Points: --- → 5
Flags: qe-verify?
Updated•10 years ago
|
Flags: qe-verify?
Flags: qe-verify+
Flags: in-testsuite?
Comment 18•10 years ago
|
||
On nightly, this is now also reproducible with about:preferences#advanced and friends.
Updated•10 years ago
|
Whiteboard: [sf-hackweek]
Updated•10 years ago
|
Priority: -- → P3
Updated•9 years ago
|
Comment 21•9 years ago
|
||
I put up a patch in bug 408415. Sorry for the double-dupe for folks whose bugs got duped here.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•