This was set to false each time a user right clicked (contextmenu) which made the zoom box never disappear.