Maybe we can factor this up, something like `onEsc($('#context-menu').remove);`. Then we can take its repeats out of filter.js and tree-selector.js.