The default bug view has changed. See this FAQ.

changed location.hash leads to tab favicon disappearance

RESOLVED DUPLICATE of bug 408415

Status

()

Firefox
General
P3
normal
RESOLVED DUPLICATE of bug 408415
8 years ago
a year ago

People

(Reporter: chameleon, Unassigned)

Tracking

(Blocks: 1 bug, {testcase})

26 Branch
testcase
Points:
5
Bug Flags:
firefox-backlog +
in-testsuite ?
qe-verify +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sf-hackweek], URL)

Attachments

(1 obsolete attachment)

(Reporter)

Description

8 years ago
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

Comment 1

7 years ago
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
This sounds like a dupe of bug 420605.

Comment 3

6 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

6 years ago
This is not a dupe of #420605.
Here is a test case: http://jsbin.com/ulaxo4

Updated

6 years ago
Version: unspecified → 3.6 Branch
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
(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 7

5 years ago
Just stumbled on this on Windows 7 64-bit, Firefox 9.0 Beta 3

Comment 8

5 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 9

5 years ago
This still seems to be a problem in v14.0.1

Comment 10

4 years ago
Still seeing this behavior in v20.0a2.

Comment 11

4 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

3 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.
I can reproduce in 26.0a2, OS X.
OS: Windows XP → All
Hardware: x86 → All
Version: 4.0 Branch → 26 Branch
Created attachment 8340226 [details]
Non-working testcase reduced too much from http://jsbin.com/ulaxo4
Keywords: testcase
Attachment #8340226 - Attachment mime type: text/plain → text/html
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
Component: Location Bar → General
Summary: change location.hash leads to location bar icon disappearance → changed location.hash leads to tab favicon disappearance
Duplicate of this bug: 1028921
Blocks: 718011
Flags: firefox-backlog+

Updated

3 years ago
Points: --- → 5
Flags: qe-verify?

Updated

3 years ago
Duplicate of this bug: 1062644

Updated

3 years ago
Flags: qe-verify?
Flags: qe-verify+
Flags: in-testsuite?

Comment 18

2 years ago
On nightly, this is now also reproducible with about:preferences#advanced and friends.
Whiteboard: [sf-hackweek]
Priority: -- → P3

Updated

2 years ago
Duplicate of this bug: 1143919

Updated

a year ago
Duplicate of this bug: 1177008

Updated

a year ago
See Also: → bug 408415

Comment 21

a year ago
I put up a patch in bug 408415. Sorry for the double-dupe for folks whose bugs got duped here.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
See Also: bug 408415
Duplicate of bug: 408415
You need to log in before you can comment on or make changes to this bug.