`data:text/html,<input disabled type=file id=input><button onclick="input.dispatchEvent(new MouseEvent('click'))">Button</button>` Per the spec the only exceptions that can activate in a disabled state are checkboxes and radio buttons. Anything else must not trigger the activation behavior. Interestingly `.click()` does not open the popup, not sure the difference.
Bug 1774035 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
`data:text/html,<input disabled type=file id=input><button onclick="input.dispatchEvent(new MouseEvent('click'))">Button</button>` Per the spec the only exceptions that can activate in a disabled state are checkboxes and radio buttons. Anything else must not trigger the activation behavior. ~~Interestingly `.click()` does not open the popup, not sure the difference.~~ (Edit: Ah yes, `.click()` is an absolute no-op if disabled, for sure)
`data:text/html,<input disabled type=file id=input><button onclick="input.dispatchEvent(new MouseEvent('click'))">Button</button>` [Per the spec](https://html.spec.whatwg.org/multipage/input.html#the-input-element%3Aactivation-behaviour) the only exceptions that can activate in a disabled state are checkboxes and radio buttons. Anything else must not trigger the activation behavior. ~~Interestingly `.click()` does not open the popup, not sure the difference.~~ (Edit: Ah yes, `.click()` is an absolute no-op if disabled, for sure)