JSFiddle - React, Tailwind, and code Playground

by MartijnR

HTML

<fieldset>
    <label>
        Select File: 
        <input type="file"/>
    </label>
</fieldset>

JavaScript

// disable both fieldset and input
$('input').prop('disabled', true);
$('fieldset').prop('disabled', true);

// enable both
$('input').prop('disabled', false);
$('fieldset').prop('disabled', false);

/*
Fields should be enabled now, but file inputs are in some kind of 
partially enabled state.
The input works if you click on the label
but the 'Choose File' button is greyed out and doesn't respond to clicks
*/

// the following 'fixes' it:
//$('input').prop('disabled', true).prop('disabled', false);