Skip to content

Commit

Permalink
focus on focusin
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpatrickpatrick committed Feb 14, 2025
1 parent 85e94b6 commit bf5cd7e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,13 @@ export class FileUpload extends ConfigurableComponent {
* When the button is clicked, emulate clicking the actual, hidden file input
*/
onClick() {
this.$button.addEventListener(
'focusin',
() => {
this.$button.focus()
},
{ once: true }
)
this.$input.click()
}

Expand Down

0 comments on commit bf5cd7e

Please sign in to comment.