Handle click on the zoom slider

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