Strangest JavaScript Bug I've Ever Seen