# Certain features are disabled when clicked but not used

**URL:** https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159
**Category:** Bug
**Created:** [April 3, 2015, 2:40pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159 "2015-04-03T14:40:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![john\_mardlin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/john_mardlin/32/115622_2.png) [@john\_mardlin](https://meta.discourse.org/u/john_mardlin)
#### Post date: [April 3, 2015, 2:40pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/1 "2015-04-03T14:40:56Z")

</div>

Continuing the discussion from [Save button is deactivated on create groups page](https://meta.discourse.org/t/save-button-is-deactivated-on-create-groups-page/27154/3):

> [@Delete button on create groups page should start deactivated](https://meta.discourse.org/t/delete-button-on-create-groups-page-should-start-deactivated/27154/3):
>
> Ahh, more specific actually.
> 
> 1. go to admin/groups/custom/undefined
> 2. Click “+ new”
> 3. Name the group
> 4. Click Delete, then click No
> 5. The save button will be disabled
> 
> I think this is actually part of a broader issue that I’ve been experiencing. Will repro and describe in linked topic.

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.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 3, 2015, 3:04pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/2 "2015-04-03T15:04:39Z")

</div>

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

[https://github.com/discourse/discourse/commit/3bae2cca4d22f88ff5a7c563a8524e9a3281a89c](https://github.com/discourse/discourse/commit/3bae2cca4d22f88ff5a7c563a8524e9a3281a89c)

---

<div class="post-metadata">

### Author: ![john\_mardlin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/john_mardlin/32/115622_2.png) [@john\_mardlin](https://meta.discourse.org/u/john_mardlin)
#### Post date: [April 3, 2015, 3:06pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/3 "2015-04-03T15:06:27Z")

</div>

Amazing response time. Thanks!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 3, 2015, 4:51pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/4 "2015-04-03T16:51:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 6, 2015, 6:14pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/5 "2015-04-06T18:14:53Z")

</div>

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](https://github.com/discourse/discourse/commit/da9e2792ebd1a4c19298247c55382aebb774e4cc)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 6, 2015, 6:21pm UTC](https://meta.discourse.org/t/certain-features-are-disabled-when-clicked-but-not-used/27159/6 "2015-04-06T18:21:43Z")

</div>


