Certain features are disabled when clicked but not used

AI-generated summary

Users reported a bug where interface elements like the save, flag, invite, and image upload buttons become disabled or unresponsive after specific interactions, such as opening and closing modals with the ESC key. john_mardlin detailed the reproduction steps, noting that clicking the flag icon twice after pressing escape triggers a Uncaught TypeError in the console, and similar issues affect the save button on the groups page and the image upload button. zogstrip quickly addressed the modal ESC issue with a fix, which john_mardlin appreciated. However, zogstrip noted that the invite button on topic pages remained broken. eviltrout subsequently identified a deeper underlying bug causing the invite button failure and provided a separate commit to resolve it.

Continuing the discussion from Save button is deactivated on create groups page:

To reproduce:

  1. Click the flag icon beneath this post
  2. Decide you’re not sure about flagging, hit escape
  3. Decide you actually do want to flag the post, click the flag icon again.
  4. The flag icon is highlighted, but nothing else happens.
  5. console gives Uncaught TypeError: Cannot read property 'prop' of undefined

This affects all flag buttons on the page.

I’ve also observed similar behaviour on:

  • The save button on the groups page
  • The invite button on a topic page
  • The image upload button in the post editing view ← most frequent and annoying instance for sure.
3개의 좋아요

Just fixed the issue when pressing ESC while a modal is open.

https://github.com/discourse/discourse/commit/3bae2cca4d22f88ff5a7c563a8524e9a3281a89c

2개의 좋아요

Amazing response time. Thanks!

The invite button on a topic page is still messed up though. Not sure why it’s acting differently :frowning: (got any idea @eviltrout ?)

That was surprisingly difficult to fix, and exposed a different leak/bug that I had to fix as well:

https://github.com/discourse/discourse/commit/da9e2792ebd1a4c19298247c55382aebb774e4cc

4개의 좋아요