publish: properly handle clicks

generated from commit e837bb5edcfaf6be87dec031a099c8020e6892d8