fix touch emulation code to allow selection of form elements.