fix loseCurrentChanges
openNewWindowOrEvent and JsFunction.Event