Closed
Bug 230281
Opened 21 years ago
Closed 19 years ago
Contextmenu blocking doesn't work. Right Click always opens the standard Context menu.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: traumwandler, Assigned: jst)
References
()
Details
Attachments
(1 file)
1.34 KB,
patch
|
adamlock
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20030306 Camino/0.7 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20030306 Camino/0.7 IE and Mozilla support Context menu blocking with javascript. Camino does handles this wrong Reproducible: Always Steps to Reproduce: Actual Results: Context menu appears next to special menu. Expected Results: Hidden the Context Menu and placed the specialized menu correctly.
Comment 1•21 years ago
|
||
we're told to display the context menu from gecko. is this a regression in the embedding layer? does it still work in winEmbed? Adam?
Comment 2•21 years ago
|
||
This works in latest Mozilla builds on MacOS X (2004011305), but in Camino I get both the JavaScript context menu and Camino's normal context menu. Dupe search shows no similar bugs anywhere, so confirming. Will investigate a bit further. Mike, how would I set about telling if this is a regression in "WinEmbed"?
Status: UNCONFIRMED → NEW
Ever confirmed: true
winEmbed doesn't display popup menus, but mfcEmbed does. I can reproduce the behaviour there. I can't reproduce it if I load up some chrome, e.g. chrome://navigator/content/navigator.xul, load "www.mozilla.org" into that and right mouse on the content area.
Comment 4•21 years ago
|
||
go to a windows machine and run winEmbed :)
Comment 5•21 years ago
|
||
adam, so that says to me it's a bug in the embedding layer, right?
Or in the DOM. I know I haven't touched the embedding layer since July. The place which adds the listener is here: http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp#864 The actual contextMenu event handler impl is here: http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp#1541 The code does call nsIDOMEvent::preventDefault() so perhaps that has broken, or maybe it should be calling nsIDOMEvent::stopPropogation() too. It would be worth CC'ing some of the DOM folks.
I bumbed into this a couple of weeks back as well. preventDefault did not seem to do anything, but return false prevented the context menu from appearing (in the context menu or click handler function).
Comment 8•21 years ago
|
||
So we're going to change the product to Mozilla right?
Comment 9•21 years ago
|
||
over to browser
Assignee: pinkerton → general
Component: General → DOM
Product: Camino → Browser
QA Contact: ian
Version: unspecified → Trunk
Comment 10•21 years ago
|
||
So what code in Mozilla handles opening the context menu? Is it the http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp code? Or not? The embedding code is never checking whether the event has been consumed; perhaps that's the issue?
Assignee | ||
Comment 11•21 years ago
|
||
Something like this then maybe? Someone care to test this?
Updated•20 years ago
|
Attachment #141006 -
Flags: review?(adamlock)
Comment 12•19 years ago
|
||
Comment on attachment 141006 [details] [diff] [review] Untested shot in the dark isDefaultPrevented should probably be initialised to PR_TRUE but makes sense otherwise, should probably be tested in mfcembed though. r=adamlock
Attachment #141006 -
Flags: review?(adamlock) → review+
Comment 13•19 years ago
|
||
Alexandre, do you happen to have a build you could give that patch a spin in?
Comment 14•19 years ago
|
||
I tested this in mfcEmbed. This patch is fine. Just misses: #include "nsIDOMNSUIEvent.h"
Comment 15•19 years ago
|
||
Comment on attachment 141006 [details] [diff] [review] Untested shot in the dark sr=bzbarsky, with Adam's comment.
Attachment #141006 -
Flags: superreview+
Updated•19 years ago
|
Assignee: general → jst
Comment 16•19 years ago
|
||
Actually, PR_FALSE is a better default... Checked in with that and the header include.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•