• Hi guys,

    I started using this plugin and it’s great! It’s just what I wanted, however I believe I’ve discovered a bug with the main editor.

    The issue: I move to a tab and expand/collapse any element. I then go back to the first tab which contains the editor and all of the buttons for formatting text stack vertically on the editor. They snap back into place when I scroll down the screen but they shouldn’t stack to begin with. This only happens after I expand/collapse one of the boxes on the edit screen.

    About my setup: I’m using WordPress 4.1.1, no custom meta boxes or anything, just the plain editor. This happens with posts, pages and a custom post type I have set up.

    Let me know if you require any screenshots/demos if you can’t replicate the issue.

    https://www.ads-software.com/plugins/tabify-edit-screen/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi, Im having the same issue. Can this be fixed?

    Plugin Author Marko Heijnen

    (@markoheijnen)

    I will check it out next week and hopefully I have it fix by then. Will let you guys know.

    Hello Marko,

    I don’t know if it may help you but I found the cause of the problem.

    When you toggle a box, a postbox-toggled event is fired. This event is then catched by an event handler which is declared in file wp-admin/js/editor-expand.js at line 640.

    // Adjust when collapsing the menu, changing the columns, changing the body class.
    			$document.on( 'wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand', adjust )
    				.on( 'postbox-toggled.editor-expand', function() {
    					if ( ! fixedSideTop && ! fixedSideBottom && window.pageYOffset > pinnedToolsTop ) {
    						fixedSideBottom = true;
    						window.scrollBy( 0, -1 );
    						adjust();
    						window.scrollBy( 0, 1 );
    					}
    
    					adjust();
    				}).on( 'wp-window-resized.editor-expand', function() {
    					if ( mceEditor && ! mceEditor.isHidden() ) {
    						mceEditor.execCommand( 'wpAutoResize' );
    					} else {
    						textEditorResize();
    					}
    				});

    This code adjusts the editor width and, because it’s set to display: none, it set the width to 0px on the div#wp-content-editor-tools… which breaks the editor. I think the logic which resize the editor is in the textEditorResize function which is called by the adjust function called by the previous piece of code.

    Maybe firing this postbox-toggled event when the tab with the editor is activated may solve the problem?

    jQuery(document).trigger('postbox-toggled')

    Simply resizing the window also repair the editor… so there is probably another event which may trigger the resizing of the editor

    If you want to temporary solve the problem, uncheck Enable full-height editor and distraction-free functionality. in the Screen Options.

    The editor-expand.js is the file which drive this new functionality.

    This editor-expand.js exposes 2 functions:

    window.editorExpand.on()
    window.editorExpand.off()

    You can also set/get the setting (on/off):

    window.getUserSetting( 'editor_expand' );
    window.setUserSetting( 'editor_expand', 'off' );

    Maybe you already figured all these things ??

    I have the same issue, it’s pretty irritating.
    Hope this can be fixed in a plugin update.

    Plugin Author Marko Heijnen

    (@markoheijnen)

    @tristanleboss: I hadn’t the change yet, so thank you for looking into it.

    I will try to have an update in the next 24 hours.

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Due sickness I didn’t had the time to look into it. I will dive into it in the next days.

    same (minor) issue here, besides that: nice plugin!

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Sorry for the delays. I still didn’t found the time to look into it. Probably will take me another 2 weeks before releasing an update.

    Plugin Author Marko Heijnen

    (@markoheijnen)

    With an even bigger delay I finally fixed it. Thanks to tristanleboss pointing me to jQuery(document).trigger(‘postbox-toggled’).

    Will go over some of my tickets to see if I can fix those too. Will release a new update in the next 24 hours.

    Thread Starter graphicscove

    (@graphicscove)

    Thanks for the update Marko! I’m looking forward to the release.

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Just released the new update. Please let me know if this fixes this issue for you.

    Hi Marko,

    Although the above is solved, I still have some layout issues with the editor, after tabs have been switched and metaboxes have been manipulated.
    When switching back to the main tab, the editor shows space in 2 parts.
    See below screenshot:

    https://dl.dropboxusercontent.com/u/2854738/tabify.png

    The spaces disappear after:
    – clicking the Visual/Text tabs of the editor
    – scrolling the page.

    Also, this behaviour is not present after turning off the setting ‘Enable full-height editor and distraction-free functionality’ in the Screen Options. I need this option though.
    This setting may point in the direction to solve this….probably another timing issue, like the one you solved above.

    Hope you can look into it.

    Thanks,
    Remco

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Hey Remco,

    Thanks for the information. I will look into it and hope to fix it within the next days.

    Best,
    Marko

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Main editor layout issue’ is closed to new replies.