Nit: would be cleaner to check if it's actually in the dropdown associated with this closure, rather than just looking at the class. (Though I can't think of a specific bug this would cause, since you probably can't have two New Rule dropdowns open at once, assuming we got everything else right :))