Conditionally deregister touchend listener