input type="file" ignores 'cursor' CSS property.




Layout: Form Controls
10 years ago
8 years ago


(Reporter: S C, Assigned: Ricardo Bittencourt)



Firefox Tracking Flags

(Not tracked)




(1 attachment)



10 years ago
User-Agent:       Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.24-1-amd64; X11; x86_64; en_US) KHTML/3.5.9 (like Gecko) (Debian package 4:3.5.9.dfsg.1-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20080404 Iceweasel/ (Debian-

Cursor is always shown as 'default' for inputs with type="file".

<input type="file" style="cursor: help;" />
<input type="file" style="cursor: wait;" />
<input type="file" style="cursor: pointer;" />

The bug is reproduced with Firefox and 3.0b5, both of Linux and Windows versions.

Reproducible: Always

Steps to Reproduce:
1. Set 'cursor' style property for some <input type="text" />
2. Open page.
Actual Results:  
Input should have cursor set with CSS style (pointer for example).

Expected Results:  
Input always have 'default' cursor.


9 years ago
Blocks: 52500
Component: General → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.form-controls

Comment 1

9 years ago
Something like this in forms.css works:

 input[type="file"] > input { cursor: inherit }
Yeah, that seems like a good idea.  Want to post a patch?
On the other hand, we really do want the "text" cursor for the textfield inside the file input by default.  Inheriting would break that.

For the button, we should probably inherit....

I'd love a comptent ui designer commenting here.  ;)

Comment 4

9 years ago
I encountered the same problem, waiting for a solution.

Comment 5

9 years ago
Created attachment 415275 [details] [diff] [review]
Patch for bug 431524.

This patch makes the cursor of the "browse..." button in an input type="file" inherits its property. This html will show the difference:

      <input type="file" style="cursor: pointer">
      <input type="file">

The first button will get the pointer cursor, the second one will have the default one.


9 years ago
Attachment #415275 - Flags: review?(bzbarsky)
Comment on attachment 415275 [details] [diff] [review]
Patch for bug 431524.

This seems fine (though for future reference, using the -p and -u8 options to diff would make this a _lot_ easier to review).

Still needs ui-review, imo.
Attachment #415275 - Flags: ui-review?(limi)
Attachment #415275 - Flags: review?(bzbarsky)
Attachment #415275 - Flags: review+

Comment 7

9 years ago
This problem is still/or new in firefox 3.5
  <input type="file" style="cursor: pointer">
doesn't show the pointer cursor neither on the button or inside textfield

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
I guess this one got filed before I knew how to work Bugzilla, I definitely never got an email on this.

Seems sane to me that this should work in a predictable manner, and allow cursor changes on file input widgets too.
Is that an r+?  If so, want to mark it?
Attachment #415275 - Flags: ui-review?(limi) → ui-review+
Assignee: nobody → bluepenguin

Ricardo, thank you for the patch, and sorry that took so long...
Last Resolved: 8 years ago
Resolution: --- → FIXED
(In reply to comment #3)
> On the other hand, we really do want the "text" cursor for the textfield inside
> the file input by default.
To be fair, the textfield now clicks like a button...
You need to log in before you can comment on or make changes to this bug.