Closed Bug 431524 Opened 16 years ago Closed 14 years ago

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

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: hans, Assigned: bluepenguin)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

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:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-1)

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

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

The bug is reproduced with Firefox 2.0.0.14 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.
Status: UNCONFIRMED → NEW
Component: General → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.form-controls
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.  ;)
I encountered the same problem, waiting for a solution.
This patch makes the cursor of the "browse..." button in an input type="file" inherits its property. This html will show the difference:

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

The first button will get the pointer cursor, the second one will have the default one.
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+
This problem is still/or new in firefox 3.5
<form>
  <input type="file" style="cursor: pointer">
</form>
doesn't show the pointer cursor neither on the button or inside textfield

User-Agent:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) 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
Pushed http://hg.mozilla.org/mozilla-central/rev/f55f58547c2c

Ricardo, thank you for the patch, and sorry that took so long...
Status: NEW → RESOLVED
Closed: 14 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.

Attachment

General

Created:
Updated:
Size: