Completed
Last Updated: 29 Sep 2015 10:38 by ADMIN
ADMIN
Ianko
Created on: 22 Jul 2014 09:53
Category: Editor
Type: Bug Report
0
Floating toolbar does not show when RadEditor is in full screen mode
The floating toolbar window does not open when the user toggles to full screen.

You can resolve the issue by incorporating the following script block:

<telerik:RadEditor runat="server" ID="RadEditor1" ToolbarMode="Floating"></telerik:RadEditor>

<script type="text/javascript">
    Telerik.Web.UI.Editor.DefaultToolAdapter.prototype._showToolbarHolder = function (isVisible) {
        var editor = this.get_editor();
        var toolbarEnum = Telerik.Web.UI.EditorToolbarMode;
        if (!isVisible) {
            if (this._toolbarHolder) this._toolbarHolder.hide(); //NEW - Add a check for the toolbar holder
            return;
        }
        
        //Hide if in fullscreen mode and toolbar is ShowOnFocus
        if (editor.isFullScreen() && editor.get_toolbarMode() === Telerik.Web.UI.EditorToolbarMode.ShowOnFocus ) return;

        //Hide previous wrapper and mark yourself as the wrapper
        var wrapper = Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper;

        //Return if you are already visible
        if (wrapper == this && wrapper._toolbarHolder && wrapper._toolbarHolder.isVisible())//NEW - toolbar holder might not be created!
        {
            //Activete it before returning, as it could have been deactivated after showing an editor dialog
            wrapper.get_toolbarHolder().setActive(true);
            return;
        }

        if (wrapper && wrapper._showToolbarHolder) wrapper._showToolbarHolder(false);
        Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper = this;

        //Create the holder in the last possible moment before showing
        this.get_window();

        //Do additional initialization depending on toolbar mode
        this._initNonDefaultToolbarMode();

        //Show toolbar hodler
        this._toolbarHolder.show();

        //IE, ShowOnFocus, PageTop: hide properly the fake toolbar parent here instead _moveToolbarsToEditor
        if ($telerik.isIE) {
            var toolbarMode = editor.get_toolbarMode();
            switch (toolbarMode) {
                case toolbarEnum.ShowOnFocus:
                case toolbarEnum.PageTop:
                    editor.get_TopZone().firstChild.style.display = "none";
                    break;
            }
        }
    };
</script>
0 comments