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.

Custom file input overflow when selecting multiple files

See original GitHub issue

When the `multiple’ property on a custom file input is enabled and a user selects a lot of files, the filenames overflow the file input.

<div class="custom-file">
  <input type="file" class="custom-file-input" id="customFiles" multiple>
  <label class="custom-file-label" for="customFile">Choose files</label>
</div>

getbootstrap com_docs_4 5_components_forms_(iPad Pro)

This overflow issues can be easy fixed by adjusting the .custom-file-label styles a bit:

.custom-file-label {
  white-space: nowrap;
  overflow-x: hidden;
}

getbootstrap com_docs_4 5_components_forms_(iPad Pro) (1)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mdocommented, Sep 17, 2020

@ms-yogi Go for it!

1reaction
mdocommented, Sep 4, 2020

This likely needs two separate patches, one for v4.x and one for v5 since we rewrote the component there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap multiple file selection - show only first file
Every time when i try select multiple files and upload them - all passed correctly, except this - in input form shows only...
Read more >
Styling File Inputs — The accessible & semantic way.
When the user selects a file, the text of a label will become the name of the selected file. If there were multiple...
Read more >
Styling & Customizing File Inputs the Smart Way - Codrops
A tutorial on how to style and customize <input type=”file”> in a ... If there were multiple files selected, the text will tell...
Read more >
Custom File Input Styling | CSS-Tricks
I've created something which is a little more helpful for such a case, a jQuery plugin that gives you the ability to stylise...
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" . Try it. HTML Demo: ::file-selector-button.
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