If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

favicon not loaded after pressing esc in the urlbar

RESOLVED DUPLICATE of bug 114548

Status

SeaMonkey
Location Bar
--
trivial
RESOLVED DUPLICATE of bug 114548
16 years ago
9 years ago

People

(Reporter: HJ, Assigned: Joe Hewitt (gone))

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

16 years ago
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.
(Reporter)

Updated

16 years ago
Severity: normal → trivial
(Reporter)

Comment 1

16 years ago
      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!
(Reporter)

Comment 2

16 years ago
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?
(Reporter)

Comment 3

16 years ago
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?
(Reporter)

Comment 4

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

Updated

15 years ago
Blocks: 120352

Comment 5

15 years ago
*** Bug 174275 has been marked as a duplicate of this bug. ***

Comment 6

15 years ago
OS=>All from bug 174275
OS: Windows NT → All
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
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.