Escape dropdown

Fixes #3241

Summoning some brogrammers *bzzzp*: @karlitschek @butonic @icewind1991 @MTGap