Opened 3 years ago

Last modified 3 years ago

#14761 confirmed Bug

Missing "`startDisabled: 1`" in table-related commands definition

Reported by: Valerij Ivashchanka Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

Steps to reproduce

  1. Add button to toolbar with any command from plugin 'table' or 'tabletools';

For example:

CKEDITOR.replace( 'editor1',{
    on: {
        pluginsLoaded: function( evt ) {
            var ed = evt.editor;
	    ed.ui.addButton( 'tableDelete', {
                label: ed.lang.table.deleteTable,
                icon: 'tests/tickets/279/tabledelete.png',
                command: 'tableDelete'
	    });
        }
    }
});

Expected result

Table-related buttons must be disabled by default when editor is ready. And enabled when cursor placed inside table.

Actual result

Table-related buttons enabled when editor is ready.

Other details (browser, OS, CKEditor version, installed plugins)

Plugins: wysiwygarea, toolbar, table.

Commands provided by plugins 'table', 'tabletools' is context-sensitive, therefore they must need have add startDisabled: 1 in definition

I'll make pull-request with changes and test based on https://github.com/ckeditor/ckeditor-dev/pull/279 after create this issue.

This issue related to:

  • #4717 - Remove Link and Outdent buttons should be disabled before editor gets focus.
  • #10439 - Initial command states are naive, biased and buggy

Change History (2)

comment:1 Changed 3 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.10 (GitHub - master)4.0

comment:2 Changed 3 years ago by Jakub Ś

Component: UI : ToolbarGeneral
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy