Fix detection of clicking on background grids.