Closed
Bug 319554
Opened 20 years ago
Closed 19 years ago
Keyboard modifier (shift,ctrl,alt) and left-clicking on a link creates an event that is NOT cancelable by event handler
Categories
(Firefox :: General, defect, P2)
Firefox
General
Tracking
()
VERIFIED
FIXED
Firefox 3 alpha1
People
(Reporter: bugzilla, Assigned: Gavin)
Details
(Keywords: fixed-seamonkey1.1a, testcase)
Attachments
(3 files)
|
2.20 KB,
text/html
|
Details | |
|
896 bytes,
patch
|
jag+mozilla
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
|
1.41 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
The following link
<a href="http://www.firefox.com" onclick="return false;">Show Bug</a>
has the onclick attribute set in order to define an event handler. Here, the handler just returns false to ask the UA to cancel the default event action.[*]
Now press a modifier key while clicking on the link and suddenly the link can be activated: it may open in a tab or even in a new window.
[*] Of course, it does not make any sense to have a link that can not be activated but it's just there as proof of concept.
Reproducible: Always
Steps to Reproduce:
Expected Results:
Expected: Nothing should happen.
| Reporter | ||
Comment 1•20 years ago
|
||
This is a testcase that shows that you can not cancel the event which is created when (shift,ctrl,alt) and left-clicking on a link.
| Reporter | ||
Comment 2•20 years ago
|
||
By the way, this report specifically refers to left-clicking and neither middle- nor right-clicking. :-)
See also:
bug 151142: talks about modifier+click on a link should not generate a "click" event AT ALL for links.
As it stands currently, FF does create the event and thus the event should be cancelable. At least, thats how I understand:
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-cancelation
Cheers
Daniel
| Reporter | ||
Comment 3•19 years ago
|
||
I still see this on the current release of FF.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
| Reporter | ||
Comment 4•19 years ago
|
||
I also see this problem on latest trunk.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060517 Minefield/3.0a1
Component: General → DOM: Events
Product: Firefox → Core
Version: unspecified → 1.8 Branch
Comment 5•19 years ago
|
||
It's on the 2.0 branch as well. I have an AJAX application and many of my links perform some JavaScript tasks and return false, but using ctrl-click or middle clicking on the link opens a new tab and does not perform the JavaScript.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1a2) Gecko/20060519 BonEcho/2.0a2 ID:2006051904
Updated•19 years ago
|
Assignee: nobody → events
QA Contact: general → ian
Comment 6•19 years ago
|
||
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a1) Gecko/20060530 Minefield/3.0a1 - Build ID: 0000000000
Confirmed. Quite odd.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: modifier (shift,ctrl,alt) and left-clicking on a link creates an event that is NOT cancelable by event handler → Keyboard modifier (shift,ctrl,alt) and left-clicking on a link creates an event that is NOT cancelable by event handler
Version: 1.8 Branch → Trunk
Comment 7•19 years ago
|
||
Not a DOM events issue. The code that opens the new tab or window doesn't check whether the default action has been prevented. It's an app issue. Reassigning to Firefox based on UA string, but Seamonkey has the same problem.
Assignee: events → nobody
Component: DOM: Events → General
Product: Core → Firefox
QA Contact: ian → general
Comment 8•19 years ago
|
||
Attachment #229281 -
Flags: superreview?(jag)
Attachment #229281 -
Flags: review?(jag)
Updated•19 years ago
|
Attachment #229281 -
Flags: superreview?(jag)
Attachment #229281 -
Flags: superreview+
Attachment #229281 -
Flags: review?(jag)
Attachment #229281 -
Flags: review+
Comment 9•19 years ago
|
||
Comment on attachment 229281 [details] [diff] [review]
xpfe fix
a=biesi for sm1.1
Updated•19 years ago
|
Keywords: fixed-seamonkey1.1a
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → gavin.sharp
| Assignee | ||
Updated•19 years ago
|
OS: Linux → All
Hardware: PC → All
| Assignee | ||
Comment 10•19 years ago
|
||
Attachment #239528 -
Flags: review?(mano)
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch-r?]
Target Milestone: --- → Firefox 3 alpha1
Comment 11•19 years ago
|
||
Comment on attachment 239528 [details] [diff] [review]
firefox patch
r=mano
Attachment #239528 -
Flags: review?(mano) → review+
| Assignee | ||
Comment 12•19 years ago
|
||
mozilla/browser/base/content/browser.js 1.709
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [patch-r?]
| Reporter | ||
Comment 13•19 years ago
|
||
Cheers mates! Thanks for fixing this bug.
Comment 14•19 years ago
|
||
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061205 Minefield/3.0a1
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•