Clicking cancel doesn't work on chrome

using history.go(-1) breaks on chrome, solution to use windows.history.go(-1)