Now beforeunload calls storeText rather than keydown