question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webkit: file upload button not completely cursor pointer

See original GitHub issue

Check with chrome on materializecss.com/forms.html, hover mouse over file upload button. Only the bottom area of the button shows the pointer cursor, the text overlays the button at the top.

To fix this, add this:

.file-field input[type=file]::-webkit-file-upload-button {
  display: none;
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielRufcommented, Apr 6, 2017

Please test the following code

.file-field input[type=file]  {
    text-indent: -999px;
}

.file-field .btn, .file-field .btn-large {
    position: relative;
    overflow: hidden;
}
1reaction
kamleshwebtechcommented, Sep 27, 2019

input[type=‘file’]{ opacity: 0; cursor: pointer; width: 24px; height: 24px; font-size: 0; position: absolute; }

cursor:pointer does not work on input file just because of the default button. No special reason here. You need to remove its appearance via this code, pay attention with font-size:0.

It works perfectly on Chrome, Firefox and IE for me. I hope, this will also help you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The cursor:pointer property doesn't apply to file upload buttons ...
this code shows hidden input file tag , the problem here is that the cursor:pointer is does not work on webkit browsers ,....
Read more >
::file-selector-button - CSS: Cascading Style Sheets | MDN
The ::file-selector-button CSS pseudo-element represents the button of an <input> of type="file" .
Read more >
Custom file upload button - DEV Community ‍ ‍
Customizing the input type="file" is a bit annoying because it comes with a button and an unchangeable text. With the ::file-selector-button ...
Read more >
Custom styled input type file upload button with pure CSS
This markup produces a button with a Choose file title followed by a text which indicates the file name when selected. By default...
Read more >
HTML : The cursor:pointer property doesn't apply to file upload ...
HTML : The cursor : pointer property doesn't apply to file upload buttons in Webkit browsers [ Gift : Animated Search Engine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found