Closed
Bug 342504
Opened 19 years ago
Closed 18 years ago
[FIX]Tab is blanked when clicking an anchor link identical to the current url
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: pile0nades, Assigned: bzbarsky)
References
()
Details
(Keywords: regression)
Attachments
(3 files, 2 obsolete files)
98 bytes,
text/html
|
Details | |
9.88 KB,
patch
|
Details | Diff | Splinter Review | |
8.78 KB,
patch
|
Gavin
:
review+
neil
:
review+
benjamin
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060621 BonEcho/2.0a3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060621 BonEcho/2.0a3
Go to the url and scroll down to zeniko's next post. Click the "I feel so ignored" link, which is the same url and anchor as the current page. The tab is blanked, and about:blank replaces the current page in the back/forward history, meaning the page can't be retreived by going back, then forward.
Reproducible: Always
Steps to Reproduce:
1. Go to the url
2. scroll to zeniko's post a few posts down
3. click the link
Actual Results:
Tab contents are deleted.
Expected Results:
Scroll back up to the anchor.
Reporter | ||
Comment 1•19 years ago
|
||
Forgot to mention, set set browser.link.open_newwindow to 1 first.
Comment 2•19 years ago
|
||
Updated•19 years ago
|
Comment 3•19 years ago
|
||
This has regressed between the 2006021305 and the 2006021404 branch nightlies. My first suspect would be bug 323810.
OTOH, with four months since the regression, this is probably a DUPE.
![]() |
Assignee | |
Comment 4•19 years ago
|
||
Yeah, this is a regression from bug 323810. For some reason, we're doing an anchor scroll even though we've already started loading about:blank.
I'll look into this when I get back in July, I guess... Mike, how does that compare with the 1.8.1 schedule? Should this be blocking 1.8.1?
Assignee: nobody → general
Blocks: 323810
Component: General → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → ian
Hardware: PC → All
Version: unspecified → Trunk
![]() |
Assignee | |
Updated•19 years ago
|
Assignee: general → bzbarsky
Priority: -- → P1
Target Milestone: --- → mozilla1.8.1
![]() |
Assignee | |
Comment 5•19 years ago
|
||
That said, I think I'd prefer to fix nsIBrowserDOMWindow per the comments; too bad I can't do that on branch. :(
Also, this patch could use some heavy testing; I've verified that it fixes this bug, but that's about it.
Attachment #226790 -
Flags: superreview?(jst)
Attachment #226790 -
Flags: review?(benjamin)
![]() |
Assignee | |
Updated•19 years ago
|
Summary: Tab is blanked when clicking an anchor link identical to the current url → [FIX]Tab is blanked when clicking an anchor link identical to the current url
Target Milestone: mozilla1.8.1 → mozilla1.9alpha
Comment 6•19 years ago
|
||
What if the current webpage is still loading when we hit this? Won't this stop the load and leave the user with a partial document?
![]() |
Assignee | |
Comment 7•19 years ago
|
||
Yes, it will. Of course if we don't do this it'll leave the user with about:blank....
The only way to really deal with that is to not start a load in an already-existing window in the window provider; I suppose I could just go ahead and extend nsIBrowserDOMWindow accordingly with an nsIBrowserDOMWindow_MOZILLA_1_8_BRANCH (and just change it on trunk).
Updated•19 years ago
|
Attachment #226790 -
Flags: review?(benjamin) → review+
Comment 8•19 years ago
|
||
On IRC we talked about implementing nsIWindowProvider(2)? on the same objects that currently implement nsIBrowserDOMWindow. I tend to like the elegance of this solution, though it may be more complicated on the branch(es) than a simpler addition to nsIBrowserDOMWindow or even a load-then-stop combination.
Comment 9•19 years ago
|
||
Comment on attachment 226790 [details] [diff] [review]
Actually, this seems to do the trick
sr=jst on this one regardless of whether we end up going this route or not. And sorry for the long wait.
Attachment #226790 -
Flags: superreview?(jst) → superreview+
![]() |
Assignee | |
Comment 10•18 years ago
|
||
I really think we should fix this, on both trunk and branches. Is there anyone familiar enough with our nsIBrowserDOMWindow impls to do this?
Flags: blocking1.9?
Target Milestone: mozilla1.9alpha1 → ---
Comment 11•18 years ago
|
||
Distinguishing between null and an about:blank URI makes more sense to me; about:blank still works for anyone who needs the current window to be cleared.
Comment 12•18 years ago
|
||
Flags: blocking1.9? → blocking1.9+
Comment 13•18 years ago
|
||
Scheduling for B2 per Boris. Not going to land this, but Boris is going to redo the fix.
Target Milestone: --- → mozilla1.9beta2
Updated•18 years ago
|
Target Milestone: mozilla1.9 M9 → ---
![]() |
Assignee | |
Updated•18 years ago
|
Summary: [FIX]Tab is blanked when clicking an anchor link identical to the current url → Tab is blanked when clicking an anchor link identical to the current url
Priority: P1 → --
Bz: feel free to reprioritize this. But this one does seem bad. Also let us know if we should try to find someone else to work on it.
Priority: -- → P3
![]() |
Assignee | |
Comment 15•18 years ago
|
||
It's kinda bad... but only happens with non-default pref values that we don't expose in the UI (and imo shouldn't support at all, but whatever).
I can try to do it, but the patch will basically need to be in UI code, not in core Gecko, so I'll have to hunt the relevant code down, etc.
![]() |
Assignee | |
Comment 16•18 years ago
|
||
Attachment #226790 -
Attachment is obsolete: true
Attachment #267356 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 17•18 years ago
|
||
Gavin, can you review the browser/ changes? Neil, can you cover suite/ ? Benjamin, everything else?
I did audit the callers, and no one in the tree except the treeowner is really passing null into this interface anyway.
Attachment #290791 -
Flags: superreview?(benjamin)
Attachment #290791 -
Flags: review?(neil)
Attachment #290791 -
Flags: review?(gavin.sharp)
![]() |
Assignee | |
Updated•18 years ago
|
Summary: Tab is blanked when clicking an anchor link identical to the current url → [FIX]Tab is blanked when clicking an anchor link identical to the current url
Comment 18•18 years ago
|
||
Comment on attachment 290791 [details] [diff] [review]
Same as diff -w
> /**
> * Load a URI
>- * @param aURI the URI to open. null is allowed; it means about:blank.
>+
>+ * @param aURI the URI to open. null is allowed. If null is passed in, no
>+ * load will be done, though the window the load would have
>+ * happened in will be returned.
Does this need a uuid change? ;-)
> case nsIBrowserDOMWindow.OPEN_NEWWINDOW:
>+ var uri = aURI ? aURI.spec : "about:blank";
> return window.openDialog(getBrowserURL(), "_blank", "all,dialog=no",
> uri, null, referrer);
I know it's a -w diff but that indentation still looks wrong...
I don't know whether it's worthwhile inlining that variable.
>+ if (aURI) {
>+ gBrowser.loadURIWithFlags(aURI.spec, loadflags);
>+ }
File style is not to brace single lines. That said, I wonder why we don't try/catch this version.
Attachment #290791 -
Flags: review?(neil) → review+
![]() |
Assignee | |
Comment 19•18 years ago
|
||
> Does this need a uuid change? ;-)
I wasn't sure. I could go either way, depending on what Benjamin thinks.
> I know it's a -w diff but that indentation still looks wrong...
I think a tab snuck in. I'll fix.
> File style is not to brace single lines.
Will fix.
No idea about the try/catch, just like no idea about the lack of referrer in the Firefox code. I tried to not change any of the existing behavior when loading.
Comment 20•18 years ago
|
||
Comment on attachment 290791 [details] [diff] [review]
Same as diff -w
>Index: browser/base/content/browser.js
> switch(aWhere) {
> case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
>+ // XXX so how come this doesn't send the referrer like the other loads
>+ // do?
This just looks like a bug. File it, and put the # in a FIXME comment?
Attachment #290791 -
Flags: review?(gavin.sharp) → review+
Updated•18 years ago
|
Whiteboard: [has patch][needs sr bsmedberg]
Comment 21•18 years ago
|
||
Comment on attachment 290791 [details] [diff] [review]
Same as diff -w
I think we should change the UUID so callers (even JS callers) can distinguish between the 1.8.1 and 1.9 behaviors.
Attachment #290791 -
Flags: superreview?(benjamin) → superreview+
Updated•18 years ago
|
Whiteboard: [has patch][needs sr bsmedberg] → [has patch][needs final patch for landing]
![]() |
Assignee | |
Comment 22•18 years ago
|
||
(In reply to comment #20)
> This just looks like a bug. File it, and put the # in a FIXME comment?
Filed bug 408379.
Addressed the rest of the comments.
Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [has patch][needs final patch for landing]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•