Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4360

Missing onRestore for CKEditor on tabbox accordion specifically

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.3
    • 8.6.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.3 S1
    • None

      Steps to Reproduce

      Run fiddle:

      http://zkfiddle.org/sample/pfs5uo/5-ckeditor-tabbox

      Click in the editor > Editor is initialized properly, selection happen.

      Click on 2nd tab (content), then click in editor

      Current Result

      Cannot click in editor (editor hasn't initialized, didn't render the editable node)

      Expected Result

      Editor should receive an onRestore event after accordion animation specifically (not other animations). to let it initialize.

      Debug Info

      Root Cause

      Workaround

      <script><![CDATA[
      zk.afterLoad('zul.tab', function() {
       var xTabpanel = {};
       zk.override(zul.tab.Tabpanel.prototype, xTabpanel ,{
       _sel: function (toSel, animation) { //don't rename (zkmax counts on it)!!
       var tabbox = this.getTabbox();
       if (!tabbox) return; //Bug ZK-1808 removed tabpanel is no longer in hierarchy, and cannot be removed
       var accd = tabbox.inAccordionMold();
       
       if (accd && animation) {
       var zkp = zk(this.$n('cave'));
       if (toSel) {
       /* ZK-1441
       * When a tabpanel is animating, set tabbox.animating
       * to block other tabpanels enter _sel().
       * Reference: _sel() in Tab.js
       */
       tabbox._animating = true;
       zkp.slideDown(
       this,
       {'afterAnima': function () {delete tabbox._animating;zWatch.fire('onRestore', null);}}
       );
       } else {
       zkp.slideUp(this);
       }
       } else {
       var $pl = jq(accd ? this.$n('cave') : this.$n()),
       vis = $pl.zk.isVisible();
       if (toSel) {
       if (!vis) {
       $pl.show();
       // Bug ZK-1454: Scrollbar forgets its position when switching tabs in Tabbox
       if (zk.ie8 || zk.webkit)
       $pl.scrollTop(this._lastScrollTop);
       zUtl.fireShown(this);
       }
       } else if (vis) {
       zWatch.fireDown('onHide', this);
       // Bug ZK-1454: Scrollbar forgets its position when switching tabs in Tabbox
       if (zk.ie8 || zk.webkit)
       this._lastScrollTop = $pl.scrollTop();
       $pl.hide();
       }
       }
       }
       });//zk.override
      });//zk.afterLoad
      ]]></script>

       

            Leon03 Leon03
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 6 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 6 hours Remaining Estimate - 2 hours
                6h