Set box.type at click