Pulling out preventDefault flag from callback