Avoid JS error when catching stray clicks not on the target buttons.