Click handling fixes (bug 1041026 and bug 1041641)