anchor.diff:          cd.editorRefocus();
         }
       };
  +
       const div = $('<div>');
       div.append(input);
       const fileOperationDialog = div.dialog({
  
positive.code:         }
        }
      });
    	input.keyup(function(event) {
        const ok = $('#file-ok');
        const newFilename = $.trim(input.val());
  
negative.code: $(() => {
  
    const fileButtons = $('#file-operations');
    const fileNew     = fileButtons.find('#new');
    const fileRename  = fileButtons.find('#rename');
    const fileDelete  = fileButtons.find('#delete');
  
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
  
    fileNew.click(() => {
      const initialFilename = 'filename' + cd.extensionFilenames()[0];
      const okInitiallyDisabled = !isValidFilename(initialFilename);
      const okClicked = (filename) => {
        cd.newFileContent(filename, '');
      };
      openDialog(fileNew, initialFilename, okInitiallyDisabled, okClicked);
    });
  
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    fileRename.click(() => {
      const initialFilename = cd.currentFilename();
      const okInitiallyDisabled = true;
      const okClicked = (filename) => {
        renameFileFromTo(initialFilename, filename);
      };
      openDialog(fileRename, initialFilename, okInitiallyDisabled, okClicked);
    });
  
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    fileDelete.click(() => {
      const initialFilename = cd.currentFilename();
      const okInitiallyDisabled = false;
      const okClicked = (filename) => {
        cd.deleteFile(filename);
      };
      openDialog(fileDelete, initialFilename, okInitiallyDisabled, okClicked);
    });
  
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    const openDialog = function(originator, initialFilename, okInitiallyDisabled, okClicked) {
      // position the dialog next to the button that launched it.
      const xPos = originator.offset().left + originator.width() + 30;
      const yPos = originator.offset().top;
      // get dialog title from button that launched it.
      const title = originator.text();
      const name = title.split(/\s+/)[0];
      // input element shows filename which may or may not enabled
      const input = makeInput(name, initialFilename);
      // dialog has ok and close buttons
      const ok = {
        text: 'ok',
        id: 'file-ok',
  