Restore preventDefault, but use tabindex to focus the parent element.

Work-in-progress. Supersedes #1322. Should fix #1321 #1288 #1099.