Opened 10 years ago

Last modified 10 years ago

#12929 confirmed Bug

Imrove command disabling mechanism — at Initial Version

Reported by: Piotr Jasiun Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

No the command state (if it is disable or not) is based on the "setState" method which is called by many plugins. It can be changed when selection change, content in selection change (#12618), mode change, editor is in readOnly mode and maybe some more cases. Also many plugins set state of the commands manually. There should be one mechanism to synchronize all this cases. Every time there is chance that a command state may change a special event is fired (e.g. commandContextChanged) and every listener check if command should be disabled. If it should the listener return false. This way we would avoid the situation when one part of code disable command the another enable it back.

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy