Handle click on the zoom slider

This PR is based on @oterral's work in #1221, and effectively supersedes #1221. @oterral reported that my commits work for his project.

Please review.