Close New Rule dropdown on inline editor close or editor resize

This is for #6005 

With this change, the New Rule button dropdown list is now dismissed for these additional cases:
1. Close button (x) is clicked
2. Host editor is resized.