Closed Bug 284512 Opened 19 years ago Closed 3 years ago

right click triggers window onclick handler

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: smacvicar, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 firefox/1.0

Was partially fixed by bug #71705
They prevented right clicking trigger element onclick events but it seems to
still be triggering the document onclick.

See testcase

Reproducible: Always
Attached file Testcase
Summary: rightt click triggers document onclick handler → right click triggers document onclick handler
Either this bug or bug 284512 is invalid.  They can't both be valid...
The other is invalid according to bug #71705
Re comment 2:  ah, oops, I meant bug 284482.
We probably need to hack nsGlobalWindow::HandleDOMEvent the same way as generic
element was hacked in bug 71705.  Do we need to hack document too?

Or is this all a non-issue?  The code in bug 71705 was put in place to work
around a very common issue with event handlers on links.  There is no such issue
with event handlers on documents and windows.
Summary: right click triggers document onclick handler → right click triggers window onclick handler
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
Assignee: events → nobody
QA Contact: ian → events
Attached file Bubble Testcase (obsolete) —
Here is another testcase that might help explain it.

Basically, "onclick" was removed for right click on all objects, except document, window, & browser chrome.  (Bug 71705#50)
However, because onclick is still enabled on document, it sometimes causes problems for complex programs that work with bubbling or capture - like vBulletin.  Should we disable onclick for document in webpages to be consistent or is there a range of webpages that now rely on this quirk?
Attached file Bubble Testcase (obsolete) —
Update/Fix
Attachment #746176 - Attachment is obsolete: true
Attached file Bubble Testcase
One last try to get it to work. Wrong mime-type. Sorry.
Attachment #746179 - Attachment is obsolete: true
Attachment #746180 - Attachment mime type: text/plain → text/html
I see

type: click
target: HTMLDivElement(id=div2)
eventPhase: 1  currentTarget: HTMLDocument	eventTarget: HTMLDivElement
eventPhase: 1  currentTarget: HTMLHtmlElement	eventTarget: HTMLDivElement
eventPhase: 1  currentTarget: HTMLBodyElement	eventTarget: HTMLDivElement
eventPhase: 1  currentTarget: HTMLDivElement	eventTarget: HTMLDivElement  id == div1
eventPhase: 2  currentTarget: HTMLDivElement	eventTarget: HTMLDivElement  id == div2
eventPhase: 2  currentTarget: HTMLDivElement	eventTarget: HTMLDivElement  id == div2
eventPhase: 3  currentTarget: HTMLDivElement	eventTarget: HTMLDivElement  id == div1
eventPhase: 3  currentTarget: HTMLBodyElement	eventTarget: HTMLDivElement
eventPhase: 3  currentTarget: HTMLHtmlElement	eventTarget: HTMLDivElement
eventPhase: 3  currentTarget: HTMLDocument	eventTarget: HTMLDivElement

vs

type: click
target: HTMLDivElement(id=div2)
eventPhase: 1  currentTarget: HTMLDocument	eventTarget: HTMLDivElement
eventPhase: 3  currentTarget: HTMLDocument	eventTarget: HTMLDivElement

for left vs. right on the latest testcase.
What do other browsers do. Do they trigger click event handler on all the event targets?

Note, there have been contradicting requests, either to have right click to trigger click listeners
or not trigger.
Component: Event Handling → User events and focus handling
Depends on: 968265

Happily reporting that this can't be reproduced anymore.

Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: