Fix #8182 by adding a check for left mouse click.

This should fix #8182 . @peterflynn can you double check?