Closed Bug 219378 Opened 21 years ago Closed 21 years ago

CTRL+middlemouse.contentLoadURL doesn't load URL if clipboard content is a hostname (and not a 'real' URL)

Categories

(SeaMonkey :: Tabbed Browser, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tibi, Assigned: caillon)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030718 Debian/1.4-2 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030718 Debian/1.4-2 By CTRL+middleclicking in content area a new tab should be loaded with the URL found in the X clipboard. This works with 'real' URLs e.g. 'http://mozilla.org/' but not with hostnames like 'mozilla.org'. Note: it works without CTRL (loading the 'URL' in current tab). Reproducible: Always Steps to Reproduce: 1. select a hostname with your mouse to get it into the X clipboard (e.g. 'mozilla.org') 2. CTRL+middleclick in content area to paste the 'URL' Actual Results: zero Expected Results: A new tab should be opened and loaded with the URL.
There is no event handling bug here. It's just that the event listener tabbrowser uses doesn't do what you think it should do.
Assignee: events → jag
Component: Event Handling → Tabbed Browser
QA Contact: ian → pmac
Yes, this is quite annoying. Fix coming up.
Assignee: jag → caillon
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch PatchSplinter Review
So nsIWebNavigation::LoadURI() fixes up the URI which is why it works when not middlemousepasting without the ctrl key pressed. However, our call path in openNewTabOrWindow must first do a security check for other callers, and it eventually calls through to checkLoadURIStr which expects a properly formed URI. I thought about adding the fixup somewhere more generic, but I don't think that would work right in all cases where someone could be loading a relative link on a website called "foo.net" or something, plus I am a bit leery of fixing up things that are going to get a security check on them shortly if we don't have to, so I think that this is the right place to do the fixup.
Attachment #143555 - Flags: superreview?(jst)
Attachment #143555 - Flags: review?(bryner)
Comment on attachment 143555 [details] [diff] [review] Patch sr=jst
Attachment #143555 - Flags: superreview?(jst) → superreview+
Comment on attachment 143555 [details] [diff] [review] Patch r=me, could you fix firefox as well? (browser.js, it looks like)
Attachment #143555 - Flags: review?(bryner) → review+
Attached patch Firefox patch (obsolete) — Splinter Review
Oops, yeah I had this fixed in my tree locally but forgot to diff it with the rest.
Comment on attachment 144077 [details] [diff] [review] Firefox patch I checked this patch in already to firefox trunk.
Attachment #144077 - Attachment is obsolete: true
Comment on attachment 143555 [details] [diff] [review] Patch Seeking approval to make middlemouse pasting to open a new tab (in linux) work.
Attachment #143555 - Flags: approval1.7?
Comment on attachment 143555 [details] [diff] [review] Patch a=chofmann for 1.7
Attachment #143555 - Flags: approval1.7? → approval1.7+
Checked in to seamonkey 03/18/2004 17:34 PST.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 184454 has been marked as a duplicate of this bug. ***
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: