User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 The input HTML form element doesn't respond to an onFocus event if the type is set to "file". Reproducible: Always Steps to Reproduce: 1. Setup a basic form, as follows: <form> <input type="file" onFocus="alert('file focus works')"> <input type="text" onFocus="alert('text focus works')"> </form> 2. click each form element above Actual Results: The alert box shows for the "text" input box, but it doesn't show for the "file" input box. Expected Results: It should have shown the alert, hence responding to the onFocus event, for both input elements.
Created attachment 102632 [details] Code fragment as testcase. WFM. (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826)
After submitting the test case I noticed that the form does gain focus when hitting the "browse" button. I also tested with Mozilla 1.2a on Windows and Mac OS X and the input text area also doesn't register focus. Thanks to the Mozilla folks who are looking at this bug. Let me know if I can assist in any other way.
Happens on Linux too. Neil, does your patch for that focus weirdness fix this?
Neil sez yes.
Hopefully bug 176100 will get fixed shortly.
Dup of bug 4033?
15 years ago
yup, looks like a duplicate to me. please correct me if i'm wrong. *** This bug has been marked as a duplicate of 4033 ***