ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Maximized and browser back button #141

Closed kzimny closed 3 years ago

kzimny commented 4 years ago

When user click on full-screen button from toolbars and press back button of browser then ui getting broken. Stackblitz editor: https://stackblitz.com/edit/angular-ivy-wxq5w9 Stackblitz demo: https://angular-ivy-wxq5w9.stackblitz.io/

20200930_085502

Dumluregn commented 4 years ago

Hello! I couldn't reproduce the issue in SB editor, but unfortunately I did in demo and in our sample. Thank you for the report.

kzimny commented 4 years ago

Dear Darek, thank you for your quick response. It seems that the maximize plugin works in "MAXIMIZE way" only and there is no option to call MINIMIZE programatically. I tried to use beforeDestroy event with no luck:

      this.instance.on('beforeDestroy', (evt: any) => {
        if (this.instance.getCommand('maximize').state === 1) {
          const command = this.instance.getCommand('maximize');
          command.setState(CKEDITOR.TRISTATE_OFF);
          // CKEDITOR.fire('maximize', CKEDITOR.TRISTATE_OFF);
        }
      });
kzimny commented 4 years ago

Any news on this issue?

Dumluregn commented 3 years ago

Hi @kzimny, sorry for the late response. As the issue concerns all single page applications (not just those created with Angular), we decided that this should be implemented in the maximize plugin itself - see https://github.com/ckeditor/ckeditor4/issues/4374. We are currently working on it, so there are chances this fix will be included in the next CKEditor 4 release (release date is not set yet though).

By the way please notice, that to minimize the editor you simply need to call maximize command again once it is active rather than trying to disable it.

kzimny commented 3 years ago

Great news! Thank you for the information.

jacekbogdanski commented 3 years ago

Closing as CKEditor 4 upstream.

kzimny commented 3 years ago

The issue still exist in ckeditor4-angular v.2.2.2, ckeditor v.4.16.2. Please explain why the task is closed.

jacekbogdanski commented 3 years ago

@kzimny the issue is not directly related to how Angular integration works but CKEditor 4. We will be fixing it in CKEditor 4 directly.

You can follow this ticket https://github.com/ckeditor/ckeditor4/issues/4374 for more updates on the issue status. Once it's fixed, the changes will be released for the next CKEditor 4 minor/major release (depending on which one comes first).

kzimny commented 2 years ago

@jacekbogdanski thank you. It works in v.4.17.1