Closed Bug 131960 Opened 23 years ago Closed 22 years ago

Different behaviour of Java Script?

Categories

(Core :: DOM: Events, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 186356

People

(Reporter: erik.fornoff, Assigned: joki)

References

()

Details

Attachments

(1 file)

Environment: ============== OS: Win NT 4.0 SP-6 Mozilla BuildID: 2002031008 Summary: ========= If you go to the above mentioned link and right-click mouse to get context menu you'll find that you get different results when using Mozilla and IE 5.5: In case of IE 5.5 a message pops up which says, that you are not allowed to use the right mouse button at this point. In case of Mozilla the above mentioned message appears, but additionally the context menu gets shown! Reproducible: always Steps to Reproduce: ==================== 1. Start Mozilla and IE or Netscape 4.51 2. go to http://www.fussballpresse.de/kunden/blutgraetsche/fuba.php3 3. click right mouse button... Actual Results: ================ Mozilla shows alert-window which tells you that usage of right mouse button is forbidden - and additionally the context menu so you can use it without any problems... Expected Results: ================== Context Menu does not appear. Additional Information: ======================== I don't know if this is really a Bug in Mozilla as I don't know Java Script at all - I just checked whether Mozilla runs into the correct branch, which seems to be ok. Perhaps it's just a bug in the Script Code of the page... Note: ====== Problem does not occur using IE 5.5 and Netscape 4.51 (e.g. the context menu does not show up when using these two browsers!).
Confirming with Mozilla trunk binaries 20020314xx Linux, 20020317xx WinNT. OS: WinNT ---> All. Browser, not engine ---> DOM Events. Here is the script popping up that alertbox: <script language=JavaScript> function rMouseKey(taste) { if (navigator.appName == 'Netscape' && (taste.which == 3 || taste.which == 2)) { alert("Die rechte Maustaste wird hier nicht benötigt!"); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Die rechte Maustaste wird hier nicht benötigt!"); return false; } return true; } document.onmousedown=rMouseKey; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=rMouseKey; </SCRIPT>
Assignee: rogerl → joki
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Events
Ever confirmed: true
OS: Windows NT → All
QA Contact: pschwartau → vladimire
Attached file Reduced HTML testcase
Note: the behavior is different on WinNT than on Linux, Mac. WinNT The alertbox only comes up once, and then the context menu Linux, Mac The alertbox comes up twice, and then the context menu And the behavior is different from IE6: IE6 (on WinNT) The alertbox comes up once. The context menu doesn't come up.
cc'ing jst -
The way to stop context menus in Mozilla is the oncontextmenu event, not the onmousedown event (since the context menus do not in fact come up onmousedown on Windows, eg). This looks like evang to me...
The site no longer works... I filed a more general bug on this, marking this a dupe of it. *** This bug has been marked as a duplicate of 186356 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: