added polyfill for preventdefault