After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 114949 - Middle click on urls and target attribute behavior
Middle click on urls and target attribute behavior
Status: RESOLVED DUPLICATE of bug 607233
Product: epiphany
Classification: Core
Component: Tabs
git master
Other Linux
: Normal normal
: Ephy/XR
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
Depends on:
Blocks:
 
 
Reported: 2003-06-11 17:21 UTC by Toni Willberg
Modified: 2012-12-11 10:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
fix (1.14 KB, patch)
2004-02-08 11:44 UTC, Marco Pesenti Gritti
none Details | Review

Description Toni Willberg 2003-06-11 17:21:13 UTC
When clicking middle mouse button on href link the page usually opens in
new tab.

Sometimes webdesigners use Javascript to open fixed size window for images
and stuff.

In Ephy when clicking middle mouse button on such link it opens an empty
new tab and does not execute href Javascript at all. Clicking with left
mouse button it executes the Javascript code and everything is as fine as
it can be.

This used to well in Galeon.


An example code from some website:

...
function OpenImage(nickname,end,img_number)
{
 NewWindow =
window.open("openimage.php?nickname="+nickname+"&end="+end+"&img_number="+img_number,"","resizable=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,width=450,height=450")
		NewWindow.focus();
}

...
<a href="javascript:OpenImage('someimage','.jpg','3');"><b>someone</b></a>
...
Comment 1 Marco Pesenti Gritti 2003-07-16 16:15:00 UTC
Would be interesting to know what mozilla does.
Comment 2 Toni Willberg 2003-07-16 16:33:32 UTC
I just tested this with mozilla-1.4-12 and epiphany-0.7.3-3, it does
not work with either of those.

However this seems to work like a charm with mozilla-1.0.1-26 and
galeon-1.2.6-0.8.0, when configured as "Middle click opens tab into
new tab" and "Open popups in tabs".


So, we actually have two problems here:

 a) Feature missing; "Open popups in tabs".

  As we are on feature freeze, we won't see this really soon.
  However I would like to see this implemented asap. :)

 b) A bug; Ephy opens new tab if middle clicked on javascript link.

  It should either ignore middle click on javascript links, or behave
like left button was clicked instead of middle.
Comment 3 Toni Willberg 2003-07-16 17:43:41 UTC
Here's a link to my Epiphany testing page. It contains a test case for
this bug too:

http://www.peelo.com/epiphany-testing.html
Comment 4 Toni Willberg 2003-07-16 17:49:23 UTC
This bug is related to bug 115134 which is about broken "middle click
opens in tabs" support for target="_blank".
Comment 5 Marco Pesenti Gritti 2003-07-22 18:32:56 UTC
Checked in a patch that doesnt open in new window javascript:. The
other part of the testcase is a lot more complex to fix, post 1.0.
Comment 6 Christian Persch 2004-01-28 13:27:25 UTC
What's left on this bug? I tried the testcase, and the first column is
all working as expected.
Middle button now _always_ opens in new tab, except for javascript:
links, so the 2nd column rows 1-3 open in new tab, and rows 4+5 open
in new/existing window.
The 3rd and 4th column don't apply any more, since the "open in new
tabs" pref is gone.

-> FIXED ?
Comment 7 Toni Willberg 2004-01-28 17:17:21 UTC
Try pressing Click 5 with left button; it opens the URL into new
window, but also changes the content of the original tab/window. Not good.
Comment 8 Marco Pesenti Gritti 2004-02-08 11:44:13 UTC
Created attachment 24200 [details] [review]
fix
Comment 9 Marco Pesenti Gritti 2004-02-08 11:47:02 UTC
The patch leave click handling up to mozilla in this case. Chpe can
you review ?

Dave, if you click on a javascript link with middle button what you
think is the better behavior ? Opening the javascript in another
window doesnt make much sense but should we ignore the click or behave
like if it was a normal click ?
Much of an academic issue, since it's all up to mozilla anyway.
Comment 10 Marco Pesenti Gritti 2004-02-08 11:47:57 UTC
The behavior we get with the patch is dont take any action btw.
Comment 11 Marco Pesenti Gritti 2004-02-08 11:52:32 UTC
I wonder if a statusbar message would make sense. "The link cannot be
opened in a new tab".
Comment 12 Christian Persch 2004-02-09 14:08:42 UTC
Patch looks good.
Comment 13 Christian Persch 2004-02-09 14:11:16 UTC
> ------- Additional Comments From Toni Willberg 2004-01-28 12:17 -------

> Try pressing Click 5 with left button; it opens the URL into ne
> window, but also changes the content of the original tab/window. Not 
> good.

I just tried it with mozilla, and it does the same!
Isn't this just a problem with not using void(....) around the expression?
Comment 14 Dave Bordoley [Not Reading Bug Mail] 2004-02-10 19:20:02 UTC
/me sucks with edgy cases...I don't know...I really don't think we
should completely overide web designers with the tabs thing. I too
have been annoyed by getting an empty tab when middle clicking a
javascript link. perhaps the best thing is to just run the javascript
on middle click and let it do its thing and not open a new blank tab.
Sure ten people will complain that they want everything to open in new
tabs but bah...
Comment 15 Marco Pesenti Gritti 2004-02-11 16:05:02 UTC
We decided to not open and put a statusbar message. I cant add the
message right now because we are freezed. Just checking in my patch
for now ...
Comment 16 Bugzilla Maintainers 2004-04-01 23:44:57 UTC
The URL field has been removed from bugzilla.gnome.org. This URL was in the old URL field, and is being added as a comment so that the data is not lost. Please email bugmaster@gnome.org if you have any questions.

URL: 
http://www.peelo.com/epiphany-testing.html
Comment 17 Christian Persch 2004-04-08 22:00:04 UTC
Comment on attachment 24200 [details] [review]
fix

This patch was committed.
Comment 18 Christian Persch 2004-06-01 14:17:39 UTC
> We decided to not open and put a statusbar message. I cant add the
> message right now because we are freezed. Just checking in my patch
> for now ...

String freeze is finished, can we move on this now?
Comment 19 Christian Persch 2004-08-23 12:48:30 UTC
In string freeze again, moving Target Milestone to 1.6.
Comment 20 Christian Persch 2004-10-13 10:54:41 UTC
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
Comment 21 Elijah Newren 2004-10-27 16:32:32 UTC
We're not in string freeze anymore; removing the BLOCKED_BY_FREEZE keyword.
Comment 22 Christian Persch 2005-02-27 13:43:30 UTC
Target Milestone: 1.6 -> 1.8
Comment 23 Christian Persch 2005-07-30 21:17:17 UTC
Target: 1.8 -> 1.10 due to feature and UI freeze.
Comment 24 Reinout van Schouwen 2005-12-20 11:54:17 UTC
chpe, can we take a decision on this before 1.10 feature/ui freeze?
Comment 25 Allison Karlitskaya (desrt) 2006-01-07 21:00:12 UTC
This bug is not a good candidate for use of the "Gnome target" field.

This field is not a 'it would be nice' field, it's a 'Gnome releases may need to be delayed for this issue' field. It's intended for use by senior-ish bug triagers and the release team.  Since this bug is not critical enough to delay a release of the entire desktop the designation has been removed.

The 'Target Milestone' field is meant to be used to describe the version of the product that developers or the maintainers believe they should fix the bug by.
Comment 26 Christian Persch 2006-08-17 14:04:20 UTC
Mass changing target 2.16 -> 2.18
Comment 27 Reinout van Schouwen 2007-04-23 22:33:45 UTC
Does anyone have testcase for this bug?
Comment 28 Diego Escalante Urrelo (not reading bugmail) 2012-12-11 10:17:27 UTC
WIP at bug 607233

*** This bug has been marked as a duplicate of bug 607233 ***