You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After taking a deeper look into the history, it seems that in the commit 4766849, code was refactored but variable active was wrongly assigned.
Previously, toolbar is active when the condition (!isSelected || readOnly) is false, ie. active toolbar only when ImageNode is selected and is not readOnly. Therefore variable active should be set to the negation of (!isSelected || readOnly), ie.
constactive=isSelected&&!readOnly;
The text was updated successfully, but these errors were encountered:
First, thanks for the great library.
Here is the situation: Toolbar of ImageNode is activated when node is clicked even the editor is set to be read-only. And it is probably related to the following line:
https://github.com/Canner/canner-slate-editor/blob/0330dc6000a3e31ff6aa7a46309c54eddb6c4acf/packages/renderer/renderer/src/components/imageContainer.js#L42
After taking a deeper look into the history, it seems that in the commit 4766849, code was refactored but variable
active
was wrongly assigned.Previously, toolbar is active when the condition (
!isSelected || readOnly
) isfalse
, ie. active toolbar only when ImageNode is selected and is not readOnly. Therefore variableactive
should be set to the negation of (!isSelected || readOnly
), ie.The text was updated successfully, but these errors were encountered: