Firefox: when tab is pressed, fileupload button text disappears

Author: ggmoriyonCreated Aug 1, 2014Updated Aug 7, 2014
Labelsbrowser bug

How to reproduce: On Basic demo select some text on the paragraph before the file input button and press tab. This behavior is also present on:

  • Basic Plus
  • Basic Plus UI
  • AngularJS

Screenshot: image

Suggestion: Add tabindex="-1" attribute on file input like this (basic-plus.html):

xml
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
  <i class="glyphicon glyphicon-plus"></i>
  <span>Add files...</span>
  <!-- The file input field used as target for the file upload widget -->
  <input id="fileupload" type="file" name="files[]" multiple  tabindex="-1">
</span>

Environments:

  • Firefox version 30.0 on Linux Mint
  • Firefox version 30.0 on OS X

Source: blueimp/jQuery-File-Upload