Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-1366

EditorEnvelopeController: Remove use of editor.setContent(..) x2

XMLWordPrintable

      EditorEnvelopeController calls an editors' setContent(..) twice when opening a file.

      The first time empty content is passed, causing the editor to initiate itself for a new file. The second time the content of the file is passed, causing the editor to initiate itself for existing content.

      Should initialisation for the new, valid content initiate any asynchronous operations they may not complete before the second call to set invalid content. In this scenario the editor may be correctly set for invalid state however when the asynchronous operation completes this state may be overridden with inappropriate state.

      Specifically for Stunner based editors; initialisation of the editor for valid content loads images from the server with an asynchronous loader that, on completion, calls back to the editor for it to be initialised. This asynchronous operation completes after the call from EditorEnvelopeController to set invalid content completes.

      See LienzoImageStripLoader called from SessionLoader that executes implementations of SessionInitializer.

              tfernand-1 Tiago Bento
              manstis@redhat.com Michael Anstis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: