Fix CustomEvent compatibility, fix clickToTap issue