Closed
Bug 533256
Opened 15 years ago
Closed 14 years ago
onkeypress and onkeydown behaves otherway around on other browsers
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: sven.siwek, Unassigned)
Details
(Whiteboard: [CLOSEME 2011-1-30])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
The TAB-Key seems not to get consumed when using obkeydown in a function.
Try html code to reproduce.
Reproducible: Always
Steps to Reproduce:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Key Event Handling</title>
</head>
<body>
<p>Press some keys and then then TAB-Key and then other keys again.<br> Try with other browsers to see difference<br>
It does seem that the TAB gets not consumed by the function.<br>
<input type="text" class="inputType"
id="bc" value="" />
</p>
<script type="text/javascript">
document.getElementById("bc").onkeydown=key_check; /* try with onkeypress too !!*/
function key_check(evt) {
if (!evt) {
evt=window.event;
}
alert(evt.keyCode);
if (evt && ( evt.keyCode==13 || evt.keyCode==9) ) {
return false;
}
}
</script>
</html>
Actual Results:
Lost focus in html window
Expected Results:
Focus stays in input field
I tried with chrome and IE. Both browsers behave just the other way round with tab-key and onkeypress/onkeydown.
Comment 1•14 years ago
|
||
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
Comment 2•14 years ago
|
||
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•