input (when type=file) doesn't respond to onFocus event when clicking in textfield

RESOLVED DUPLICATE of bug 4033

Status

()

Core
Layout: Form Controls
P3
normal
RESOLVED DUPLICATE of bug 4033
15 years ago
14 years ago

People

(Reporter: Duane Gran, Unassigned)

Tracking

({testcase})

Trunk
mozilla1.3beta
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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)
Keywords: testcase
(Reporter)

Comment 2

15 years ago
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?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: input (when type=file) doesn't respond to onFocus event → input (when type=file) doesn't respond to onFocus event when clicking in textfield
Neil sez yes.
Depends on: 176100

Comment 5

15 years ago
Hopefully bug 176100 will get fixed shortly.
Assignee: jkeiser → form
Priority: -- → P3
Target Milestone: --- → mozilla1.3beta

Comment 6

15 years ago
Dup of bug 4033?
Blocks: 4033

Comment 7

14 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 ***
No longer blocks: 4033
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.