Closed
Bug 101149
Opened 24 years ago
Closed 24 years ago
Previous window title sticks when accessing file:// directory listings
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: greenrd, Assigned: bbaetz)
References
Details
Attachments
(1 file, 1 obsolete file)
2.18 KB,
patch
|
jrgmorrison
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4+) Gecko/20010922
BuildID: 2001092206
If you're browsing some images on your local filesystem using the file://
directory listing widget, and you click on an image file and then press back,
the window title will stay as "Image __ x __ pixels".
Reproducible: Always
Steps to Reproduce:
1. Save an image to e.g. /tmp/test.jpg
2. Go to file:////tmp in the browser
3. Double-click on image
4. Click back button
Actual Results: Window title stays as "Image __ x __ pixels".
Expected Results: Shouldn't say it's an image because it isn't.
Comment 1•24 years ago
|
||
I tried this several times on Windows 98, using c:\porn\ instead of /tmp. It
worked the first time (the window title would be file:///c|/porn/). But when I
tried it a few minutes later, that title would never appear, even when
navigating forward from a web page instead of navigating backward from an image.
So I can confirm that this bug happens most of the time.
This bug might happen because directory listings use a low-level function to set
the title when it should be using a higher-level function. See bug 46960
(" - Mozilla" not appended to URL in titlebar for local index pages).
I'm seeing this 2001092308 W98.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Summary: Incorrect window title after clicking back button going back to file:// directory listing → Previous window title sticks when accessing file:// directory listings
Comment 3•24 years ago
|
||
sounds like bug 98582, but not sure if this is the same/exact issue. is there
another existing bug for this?
Whiteboard: dupeme?
There is a file URL bug about Reload not firing on the most recent file URL.
Comment 5•24 years ago
|
||
Comment 6•24 years ago
|
||
I don't know if there is a dup, but the attached patch seems to fix this.
Probably for ancient reasons, there was a scheme to set a property parentWindow
on _content in the onload handler. Well, it turns out that the onload doesn't
fire for directory viewer (don't know why; there is though a comment to that
effect in directory.js). At any rate, if we just set the 'document.title' then
that title (the current URL) will be reflected back into the window's titlebar.
Look reasonable, pchen?
*** Bug 105873 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 9•24 years ago
|
||
Comment on attachment 51393 [details] [diff] [review]
patch; just use document.title; remove the (unused) setup of _content.parentWindow
jrgm: The default char stuff does work. Not sure why onload doesn't fire. The
stuff to load the xul listing is an evil evil evil hack.
If this works, r=bbaetz. See if rjc or waterson wants to explain whats happened
to the onload...
Attachment #51393 -
Flags: review+
Comment 10•24 years ago
|
||
Attachment #51393 -
Attachment is obsolete: true
Comment 11•24 years ago
|
||
Comment on attachment 59483 [details] [diff] [review]
same patch; just remove my (erroneous) comment about the onload not firing
presumptively transfer the r=bbaetz from earlier patch (only removed a comment)
Attachment #59483 -
Flags: review+
Comment 12•24 years ago
|
||
So, bbaetz was correct; the onload is firing and
calling checkForDirectoryListing. The real problem was that directory.js races
the onload handler to see whether 'Init()' in directory.js gets called before
or after _content.parentWindow has been set. This actually works sometimes on
short directory listings, but always loses on larger directories.
The patch just sets document.title instead, and that always results in the
correct title being shown in the titlebar. (Not that I know why, but maybe
hyatt can explain, and sr= at the same time).
Comment 13•24 years ago
|
||
Comment on attachment 59483 [details] [diff] [review]
same patch; just remove my (erroneous) comment about the onload not firing
sr=darin (bbaetz pinged me for an sr, and this patch looks good to me)
Attachment #59483 -
Flags: superreview+
Assignee | ||
Comment 14•24 years ago
|
||
jrgm: Do you want me to check this in for you?
Comment 15•24 years ago
|
||
Yes, please. If you could check that in, that would be great.
Assignee | ||
Comment 16•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 17•23 years ago
|
||
vrfy'd fixed using 2002.01.07.0x comm bits on linux rh7.2, winnt and mac 10.1.2.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•