2 Replies Latest reply on Aug 1, 2013 2:37 AM by offlab1

    The onDeactivate event handler doesn’t work in InDesign CC. Why?

    offlab1

      Hi guys.

      I’m working on a script in Javascript for InDesign CC.

      The big problem is that the onDeactivate event handler doesn’t work.

       

      Here’s an example that works in InDesign CSx but not in InDesign CC:

       

      #target indesign
      var w = new Window ("dialog", "Test onDeactivate");
      var et_1 = w.add("edittext", [undefined, undefined, 300, 30], "Lorem ipsum");
      var et_2 = w.add("edittext", [undefined, undefined, 300, 30], "Dolor sit amet");
      var st = w.add("statictext", [undefined, undefined, 300, 30], "CONSOLE:\r\r", {multiline: true});
      et_1.onDeactivate = et_2.onDeactivate = function(){
           st.text = "CONSOLE: I left the field with this text:\r\t«" + this.text +"»"; }
      var b_ok = w.add("button", undefined, "OK");
      w.show();
      

       

      The script shows a dialog window with 2 edit text fields: when a field loses the focus (clicking on the other one), the «CONSOLE» shows the text of the old field.

       

      Adobe, please, fix this issue as soon as possible.

       

      Thanks.

      Giorgio