{{click}} Command — Discourse "Upload" button not interactive?

Hi there,

I'm trying to use the {{click}} command on a Discourse rich-text editor button, in particular, the "upload" button.

Screenshot 2025-07-01 112528

The HTML looks like this (taken from this forum's post editor):

<button class="btn no-text btn-icon upload" tabindex="-1" title="Upload" type="button">
  <svg class="fa d-icon d-icon-far-image svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#far-image"></use></svg>
  <span aria-hidden="true">​</span>
</button>

This is how I've set it up,

but Text Blaze couldn't find the clickable button element on the page (when I'm composing a post reply and the editor is open).

Command to click failed
.upload did not match any interactive element

Would appreciate some advice to solve this!

Hi @samliew

Thanks for sharing the detailed post. I see the button has a tabindex=-1, so the user cannot focus it using the Tab key on their keyboard.

We had earlier added this restriction to help users when they accidentally select a non-clickable element (like an arbitrary <div> or a <section> on the page).

However, the button is obviously interactive as you pointed out. We will soon update the {click} command to allow the user to click on all elements.

The update will hopefully be live in the Beta channel by next week. Feel free to email me at gaurang@blaze.today if you'd like to be added there.

1 Like