Revert addEventListener back to assuming valid window and using shelve.autoselect global. In onOK call as win.shelve.setupAutoSelect(), which will make