Issue #2885412 by brockfanning: Javascript error after media upload: Cannot read property 'selectedMedia' of undefined