Only restore the context on preventDefault

preventDefault() appears to *set* the cancelled flag, so we should abort context restoration if the cancelled flag is *not* set.