Closed
Bug 290051
Opened 20 years ago
Closed 20 years ago
javascript block backspace history back
Categories
(Firefox :: Keyboard Navigation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 272820
People
(Reporter: roxwal, Assigned: aaronlev)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.6) Gecko/20050318 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.6) Gecko/20050318 Firefox/1.0.2
In the javascript:
<body onkeydown="cancelBack()">
<SCRIPT LANGUAGE="JavaScript">
<!--
function cancelBack(){
if ((event.keyCode == 8 && (event.srcElement.form == null ||
event.srcElement.isTextEdit == false))
|| event.keyCode == 37 && event.altKey || event.keyCode == 39 && event.altKey )
{
event.cancelBubble = true;
event.returnValue = false; }
}
//-->
</SCRIPT>
<form method="POST" action="#">
[..]
</form>
Javaconsole retunr me error in event.keycode:
event is not defined
in explorer this code works
Reproducible: Always
Steps to Reproduce:
1.Create a form with my code
2.Press backspace in a text box
3.Press backspace in any other place of form (the browser go wrongly in previous
page)
Actual Results:
the browser go wrongly in previous page
Expected Results:
the browser ingnore the key pressed
Comment 1•20 years ago
|
||
*** This bug has been marked as a duplicate of 272820 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•