Ignore clicks on history entries if the mouse has moved

Ignore click events on history events if the mouse moves so that
drag selection can work. Fixes #581.
Merge branch 'master' into overpass
Ignore clicks on query results if the mouse has moved