Closed
Bug 290231
Opened 19 years ago
Closed 19 years ago
links which are coded with the onclick attribute cannot be middle-clicked
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 156137
People
(Reporter: navidazizi, Unassigned)
References
()
Details
Attachments
(1 file)
436 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050406 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050406 Firefox/1.0.3 When a link is coded by using the onclick attribute to change document.location.href, it cannot be middle-clicked. For a normal user, it will seem odd that a link produces no effect (regularly a new tab) when they middle-click it. The link will produce an effect when it is left-clicked. Reproducible: Always Steps to Reproduce: 1. Go to uefa.com 2. Middle-click on one of the main news items. Actual Results: The page scroll cursor appears Expected Results: The link should have opened in a new tab. I'll attach a simple testcase.
Comment 2•19 years ago
|
||
*** This bug has been marked as a duplicate of 156137 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Comment 3•19 years ago
|
||
This is not a duplicate of bug 156137. Reporter wants the link to open in a *new* tab, so this is more like bug 55696, except 1) it doesn't say anything about links with "onclick" handlers 2) it doesn't apply to non-links, which is what the testcase shows. Reporter, do you really want to work it for <td onclick=...> or is it for links only (as summary states)? In the former case, please reopen this bug, updating summary accordingly.
I do want a middle-click to work on <td onclick="...> when the onclick="" specificies a change in the url of the page. At uefa.com, for a general user two things are obvious over the table cell 1. the pointer appears over the table cell 2. the table cell is clickable and the page changes. Thus for them the table cell seems like a normal link. They don't know the difference between the table cell with onclick="" and a normal link. Thus if they choose to middle-click it, which ordinarily opens a new tab, and it doesn't work, it seems to be a bug in firefox. I understand why, however, why it might be a bad idea as per bug 156137 to implement the change. Maybe the onclick handler has to be a bit smarter, only accepting the middle click, when the onclick specifies a change in the url.
Comment 5•19 years ago
|
||
> Thus for them the table cell seems like a normal link.
That's a evangelism bug I would say (that is uefa.com should be convinced not to
disguise <td>s as links). The request for handling middle-clicks in such a way
for all elements is quite hard to implement, and IMHO, should be wontfixed.
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•