Fix: Shelve edit window failed to close on "ok" because shelve.addEventListener was throwing an uncaught exception because it assumes its called from a browser window.
Fix: Auto-select listener properly installed and removed.