Uploaded image for project: 'Java Script UI (App and Dialog Fields)'
  1. Java Script UI (App and Dialog Fields)
  2. JSFIELD-18

Change event is not triggered in root context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 1.2
    • 1.1.8
    • None

    Description

      Steps to reproduce

      1. Open a Dialog with a textField and a JS-Dialog field from root in a content app
      2. Try to capture the change event like in the code example
      3. Change something in the textField

       

            window.addEventListener(
              "message",
              function (event) {
                console.log(event.data.action);
                if (event.data.action === "init") {
                  correlationId = event.data.correlationId;
                  console.log(event.data);
                } else if (event.data.action === "change") {
                  textDescription = event.data.state.formFields.textDescription;
                  console.log(textDescription);
                }
              },
              false
            ); 

       

      Expected results

      The change event should be fired and the text should appear in the console.

      Actual results

      The change event is not fired.

      Workaround

      Putting the dialog in the folder section of the content app seems to work. So it feels like the problem is the root context.

      Development notes

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              rdrangovski Riste Drangovski
              tobias.kerschbaum Tobias Kerschbaum
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: