Closed Bug 1038290 Opened 6 years ago Closed 6 years ago
Update the favicon when the href attribute of link rel="icon" is changed
(From Bug 577892 comment #0) > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:220.127.116.11) > Gecko/20100625 Firefox/3.6.6 > Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:18.104.22.168) > Gecko/20100625 Firefox/3.6.6 > > ive created a test page to reproduce this behavior. youd except icon would > change after button click, but it doesnt. the href attribute changes. when i > drag a panel into a new firefox window, new icon is already shown, so i > guess its problem with user interface rendering. > > <html> > <head> > <title>Test</title> > <link rel="icon" href="calm.png"/> > </head> > <body> > <button > onclick="document.getElementsByTagName('link').href='hot.png';">Simulate > Event</button> > </body> > </html> > > Reproducible: Always > > Steps to Reproduce: > try the example code in description > Actual Results: > icon doesnt invalidate > > Expected Results: > icon should change to a new one
Tested at http://gijsk.com/mozilla/testcases/icons.html (from bug 577892 comment 7)
Comment on attachment 8455483 [details] [diff] [review] Patch v1 proposed fix. Nice, but this would push multiple updates for the same feed if the href changed, can you do something about that?
(In reply to firstname.lastname@example.org from comment #2) > Nice, but this would push multiple updates for the same feed if the href > changed, can you do something about that? I've added an early return if the event type is "DOMLinkChanged"
Comment on attachment 8458669 [details] [diff] [review] Patch v2 return early if event type is "DOMLinkChanged" Note to self: testing works better if your build supports the DOMLinkChanged event.
Attachment #8458669 - Flags: review?(neil) → review+
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/df9ba9a12820
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.30
You need to log in before you can comment on or make changes to this bug.