Closed Bug 159117 Opened 22 years ago Closed 22 years ago

JavaScript - checking of form inputs

Categories

(Core :: JavaScript Engine, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 53579

People

(Reporter: juxi.leitner, Assigned: rogerl)

Details

When trying to jump back to the input field after checking the data put into,
the following JavaScript function is executed without errors, but still the
button (or the next input field) is selected, not the one represented by field:

function checkKlasse(field){
	if(field.value != 'J' && field.value != 'K') {
		field.focus();
		field.select();
	}					
}
Reporter: could you attach a complete testcase ?
And please tell us your build-ID.
There's a short example:
http://dir.juxi.dyndns.org/projects/JStest.html
when entered a non-number value in one of the fields and then set the focus in
another one (by just clicking in another one or pressing TAB) the onblur
function should be called! The error is printed, but the focus and the selection
NOT set! If you try it with another browser (e.g. IE) it is!
My build is: 2002072104
Confirmed on WinXP trunk build 2002072308.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Duplicate of "calling this.blur() in onfocus handler or this.focus() in an
onblur handler do not work"
*** This bug has been marked as a duplicate of 53579 ***

*** This bug has been marked as a duplicate of 53579 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Verified Duplicate. 

Juxi: thank you for this report. You have been cc'ed on the
duplicate bug so you can follow its progress -
Status: RESOLVED → VERIFIED
thx!
You need to log in before you can comment on or make changes to this bug.