Uploaded image for project: 'ZK CKeditor'
  1. ZK CKeditor
  2. ZKCK-82

goldenlayout maximizing panel freezes nested ckeditor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 4.17.1.0
    • 4.14.0.0
    • Security Level: Jimmy

      Steps to Reproduce

          <goldenlayout height="100%">
              <attribute name="areas">A</attribute>
              <goldenpanel area="A" draggable="false">
                      <ckeditor value="initial value"/>
              </goldenpanel>
          </goldenlayout>
      

      maximize the goldenlayout panel

      Current Result

      ckeditor loses current text value, editing is no longer possible
      ckeditor can't be resized instead gives a JS error

      ckez.wpd:373 Uncaught TypeError: Cannot read property 'frameElement' of undefined
          at a.CKEDITOR.editor.resize (ckez.wpd:373)
          at CKEDITOR.dom.document.f (ckez.wpd:892)
          at CKEDITOR.dom.document.p (ckez.wpd:13)
          at CKEDITOR.dom.document.fire (ckez.wpd:15)
          at HTMLDocument.<anonymous> (ckez.wpd:71)
      

      Expected Result

      ckeditor remains functional, no error

      (e.g. this works with a ckeditor inside a maximized portallayout panel)

      Debug Information

      Workaround

      zk.afterLoad('ckez', function() {
          var xCKeditor = {};
          zk.override(ckez.CKeditor.prototype, xCKeditor, {
              _syncSize : function() {
                  if(this._editor && this._editor.document && !this._editor.document.getWindow().$) {
                      this._restore();
                  } else {
                      xCKeditor._syncSize.apply(this, arguments);
                  }
              }
          });//zk.override
      });//zk.afterLoad
      

            Unassigned Unassigned
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: