alert
opens a model dialogue. When it is open, you can't interact with any part of the page except the alert itself.
Since you can't interact with the page, the second half of the double click can't reach the span, so the double click event won't fire.