Better evaluation of toggle-prevent-default