Fixes media editor text color selection prior to entering text

This commit is contained in:
Josh Perez 2022-01-21 17:46:07 -05:00 committed by GitHub
parent 9f0ea1cbf7
commit 7fb23a1f6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -439,9 +439,13 @@ export const MediaEditor = ({
return;
}
const { isEditing } = obj;
obj.exitEditing();
obj.set(getTextStyleAttributes(textStyle, sliderValue));
fabricCanvas.requestRenderAll();
if (isEditing) {
obj.enterEditing();
}
}, [fabricCanvas, sliderValue, textStyle]);
// Create the CroppingRect