Don't capture clicks with element.onclick

Plus other changes.