Closed
Bug 142626
Opened 22 years ago
Closed 20 years ago
favicon not loaded after pressing esc in the urlbar
Categories
(SeaMonkey :: Location Bar, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 114548
People
(Reporter: bugs4hj, Assigned: hewitt)
References
(Blocks 1 open bug)
Details
mozilla builds 20020402906 and up steps to reproduce: 1.start mozilla 2.load http://www.mozilla.org (page loads with favicon) 3.type something in the urlbar, do NOT press enter 4.press esc current result: favicon is missing expected result: favicon gets loaded/actived again note: I already made a patch for tabbed mode.
SetPageProxyState("valid", null); // XXX Build a URI and pass it in here. <new> if (getBrowser().mTabbedMode) { getBrowser().updateCurrentBrowser(); } else { var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var aURI = ioService.newURI(url, null, null); var favStr = getBrowser().buildFavIconString(aURI); getBrowser().loadFavIcon(aURI, "src", document.getElementById("page-proxy-favicon")); document.getElementById("page-proxy-deck").selectedIndex = 0; } </new> } else { //if about:blank, urlbar becomes "" This will fix this issue, but I'm unsure if this is the way to do it!
The code in comment #1 only works when 'mTabbedMode' is true. I searched for DOMLinkAdded and this is what I found: http://lxr.mozilla.org/seamonkey/search?string=DOMLinkAdded I like to know why this isn't working, is this because of the missing addEventListeners?
Yet another "It's time to sleep" typo! I like to know why this isn't working if mTabbedMode is false. Is this because of missing addEventListeners?
These two code snaps do work for me, but what do you think? <navigator.js> SetPageProxyState("valid", null); // XXX Build a URI and pass it in here. gBrowser = getBrowser(); if (gBrowser.mTabbedMode) gBrowser.updateCurrentBrowser(); else if (url = gProxyFavIcon.getAttribute("linked-icon")) { gProxyFavIcon.setAttribute("src", url); gProxyDeck.selectedIndex = 1; } </navigator.js> <tabbrowser.xml:onLinkAdded> else { if (!contentPolicy.shouldLoad(Components.interfaces.nsIContentPolicy.IMAGE, uri, event.target, tabBrowser.mCurrentBrowser.contentWindow)) return; // Save linked-icon href for handleURLBarRevert() gProxyFavIcon.setAttribute("linked-icon", href); } </tabbrowser.xml:onLinkAdded>
Comment 5•22 years ago
|
||
*** Bug 174275 has been marked as a duplicate of this bug. ***
Comment 7•20 years ago
|
||
favicon should not be disappearing while you are typing at all. The shortcut icon reflects the site, not the URL. Until you press enter, it shouldn't change. *** This bug has been marked as a duplicate of 114548 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•