fix keyboard & touch behavior of custom checkboxes

Seems from #2090 that there is a rewrite of custom forms coming in 5.0, but fixing just checkboxes at least seems straightforward. Maybe this is worthwhile including in a 4.x point release?