Closed
Bug 111909
Opened 24 years ago
Closed 23 years ago
middle-click on mailto: link opens a blank tab
Categories
(SeaMonkey :: Tabbed Browser, defect)
Tracking
(Not tracked)
mozilla1.1alpha
People
(Reporter: aha, Assigned: jag+mozilla)
References
(Depends on 1 open bug)
Details
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.6+) Gecko/2001112508
Repro:
1. set 'Middle click or control-click of links in a Web page' to checked
2. fine page with link mailto:foo@foo.com
3. middle click on it
Actual:
New tab is opened, mail client is starting.
Expected:
Just mail client will be started, because tab with mailto: is IMHO useless.
Comment 1•24 years ago
|
||
if tab is not opening, a new window will open on a Mailto: link.
Comment 2•24 years ago
|
||
We block new window creation in this case (just open mailcompose, not
mailcompose _and_ new window). We should also block new tab creation.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•24 years ago
|
||
All middle mouse clicks on mailto: links can be disabled by this, small, change
in contentAreaClicks.js:
143 - handleLinkClick(event, linkNode.href);
143 + handleLinkClick(event, linkNode.href.toLowerCase);
195 + if ( href.search( "mailto:" ) >= 0 ) { // bail out on mailto links
196 + return;
-Neil.
Comment 4•24 years ago
|
||
Oops, line 196 should read
return false;
to prevent a JS strict error.
Comment 5•24 years ago
|
||
Well, you better forget about line 143, because a middle mouse click on 'View
Bugs Already Reported Today' on bugzilla.mozilla.org results in this message:
Please stand by ...
Content-type: text/html
Software error:
Evil code attempted to write stuff to the shadow database. at globals.pl line 201.
For help, please send mail to the webmaster (webmaster@mozilla.org), giving this
error message and the time and date of the error.
-Neil.
Comment 6•24 years ago
|
||
Neil:
if (href.toLowerCase().search( "mailto:" ) == 0) // bail out on mailto links
return false;
or more simple (if otherwise returning true):
return (href.toLowerCase().search( "mailto:" ) == 0);
1.) You don't want to change the url. Only lowercase it, while comparing.
2.) Compare with == not >=. The URL might contain "mailto:" somewhere else.
Hope this helps,
Niklas
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1
Comment 7•24 years ago
|
||
Reassigning to new component owner.
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW
*** Bug 122329 has been marked as a duplicate of this bug. ***
Comment 9•24 years ago
|
||
I do get the same behaviour for other protocols as well on my mac using
<command-click>.
(Sorry for the spam, just wanted to add myself to the cc list. )
Updated•23 years ago
|
Summary: could open mailto: link to a new tab using middle button → middle-click on mailto: link opens a blank tab
Updated•23 years ago
|
QA Contact: sairuh → pmac
Comment 10•23 years ago
|
||
*** Bug 179833 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
*** This bug has been marked as a duplicate of 97032 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Updated•17 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•