Open Bug 302201 Opened 19 years ago Updated 2 years ago

Closing the window with ALT+F4 can be canceled by script

Categories

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

x86
Windows XP
defect

Tracking

()

People

(Reporter: daniel, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When using the following JavaScript I can cancel ALT+F4 to close the window.

document.onkeydown = function(e) {
  e = e||window.event;
  if (e && e.altKey && e.keyCode == 115) {
    alert("no");
    return false;
  }
};

IMHO closing the application should not be canceable by script.

Reproducible: Always

Steps to Reproduce:
IE also shows the alert, but after you dismiss the alert, its closed
Yes. In this case that's exactly what I expect. This way, I'm able to show a
last message. We use it in some learning applications and browser based software
simulations.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050726
Firefox/1.0+ ID:2005072606
I can confirm
I can confirm this bug, too.

Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717
Firefox/1.0.6
do you still see this problem? please update the bug with comment and/or close as appropriate.

(bug has no comment since 2007-01-01)
Whiteboard: closeme 2009-08-01
I can still reproduce this bug on
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5

-> NEW
Status: UNCONFIRMED → NEW
Component: General → Keyboard Navigation
Ever confirmed: true
QA Contact: general → keyboard.navigation
Whiteboard: closeme 2009-08-01
Component: Keyboard Navigation → General
Product: Firefox → Core
QA Contact: keyboard.navigation → general
Version: unspecified → Trunk
Flags: wanted1.9.1.x?
Flags: wanted1.9.0.x?
Flags: blocking1.9.2?
Flags: blocking1.9.2? → blocking1.9.2-
Flags: wanted1.9.1.x?
Flags: wanted1.9.0.x?
I don't think this is a bug. How about you, smaug?
Component: General → Event Handling
QA Contact: general → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.