added touch cap detect and fixed touch event problem