0 Replies Latest reply on May 22, 2017 1:40 PM by John Kriho

    JavaScript UI Problem, INDD 12.1.0.56 with OSX 10.12.4

    John Kriho Level 1

      Hello,

       

      Not sure what is going on with the InDesign UI changes (there are issues - see InDesign Update (12.1.0.56) Crashes with JavaScript Tabbed Dialogs ), but now things seem to be compounded by an (apparent) change in Mac OSX. Here is what we are seeing.

       

      The sample code below presents a very simple dialog with an OK button. When you click OK, the following should occur:

       

      1) Dialog should close instantly, as soon as you click OK

      2) There should be a brief 2-second pause

      3) An alert message wil be displayed

       

      TestDialog();

      $.sleep(2000);

      alert("Done");

       

      // --------------------------------------------------------------------------------

      function TestDialog()

      {

          var w = null;

       

          w = new Window ("dialog", "Test", undefined);

          var okButton = w.add("button", undefined, "OK" ,{name:'ok'});

          okButton.onClick = function ()

          {

              w.close();

          }

       

          w.show();   

      }

       

      When running OSX 10.10.5, there are no issues.

       

      When running OSX 12.12.4, rather than closing the window immediately upon clicking the OK button, the window remains open through the 2-second pause, and is dismissed only when the alert is eventually displayed.

       

      We have JavaScript code that presents a UI, then modifies the document. Our users are reporting that the dialog windows are staying open, and only dismissed upon completion of the entire script. Interestingly, this does not seem to affect processing of the document, as once the process is complete the document has in fact been modified. It's just that it looks to them like nothing is happening because the UI remains visible, and even the InDesign document drawing is somehow "frozen" during this process.

       

      If anyone can recommend a workaround that would be appreciated.

       

      Thanks,

       

      JK