Update margin toggle event handler condition