Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7763209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:36:17+00:00 2026-06-01T14:36:17+00:00

<label for=input>Label</label><input type=file id=input/> In Firefox 7 it is not possible to trigger the

  • 0
<label for="input">Label</label><input type="file" id="input"/>

In Firefox 7 it is not possible to trigger the open file dialog by clicking on the label.

This SO question is very similar but that’s green checked with it’s a bug in FF. I’m looking for a workaround.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:36:18+00:00Added an answer on June 1, 2026 at 2:36 pm

    thank you for this q&a… helped me out.

    my variation of @marten-wikstrom’s solution:

    if($.browser.mozilla) {
      $(document).on('click', 'label', function(e) {
        if(e.currentTarget === this && e.target.nodeName !== 'INPUT') {
          $(this.control).click();
        }
      });
    }
    

    notes

    • using document.ready ($(function() {...});) is unnecessary, in either solution. jQuery.fn.live takes care of that in @marten-wikstrom’s case; explicitly binding to document does in my example.
    • using jQuery.fn.on… current recommended binding technique.
    • added the !== 'INPUT' check to ensure execution does not get caught in a loop here:

      <label>
        <input type="file">
      </label>
      

      (since the file field click will bubble back up to the label)

    • change event.target check to event.currentTarget, allowing for initial click on the <em> in:

      <label for="field">click <em>here</em></label>
      
    • using the label element’s control attribute for cleaner, simpler, spec-base form field association.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My current code (not working): <label for=homepage><h3>Home Page Image</h3></label><input type=hidden name=MAX_FILE_SIZE value=300000 /><input type=file
This is my code so far: The HTML: <form> <label>First Name</label> <input type=text class=first
foreach($apps as $app){ echo $this->Form->input('Application', array('type'=>'checkbox', 'id'=>$app['Application']['description'], 'div'=>false,'type'=>'checkbox','value' => $app['Application']['description'],'label'=>$app['Application']['description'])); } <div class=checkboxes> <input
i want to output some text in an label <input type=text size=20 maxlength=20 name=pizza1
<label>Search: <input type=text aria-controls=company></label> Using Datatables , how would i added a class to
I always try to do the following: <label><input type=checkbox /> Some text</label> or <label
Say I have the following mark up: <label for=name>Name:</label> <input type=radio name=name id=name/> The
My HTML FORM code: <form action=upload.php method=GET enctyped=multipart/form-data> <label for=file> Filename:</label> <input type=file name=loadedFile
I have a Facelet file with JSF tags to display a label, an input
I am designing a web page with multi line Label name & input type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.