Certain features are disabled when clicked but not used

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 Likes

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

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

2 Likes

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 Likes