fix changing font when editing text

aakansha-wireframe
dwelle 3 years ago
parent eff5871147
commit 7f4b72010e

@ -1919,6 +1919,10 @@ class App extends React.Component<AppProps, AppState> {
this.setState({ this.setState({
draggingElement: null, draggingElement: null,
editingElement: null, editingElement: null,
selectedElementIds: {
...this.state.selectedElementIds,
[element.id]: true,
},
}); });
if (this.state.elementLocked) { if (this.state.elementLocked) {
setCursorForShape(this.canvas, this.state.elementType); setCursorForShape(this.canvas, this.state.elementType);

@ -319,7 +319,9 @@ export const textWysiwyg = ({
// prevent blur when changing properties from the menu // prevent blur when changing properties from the menu
const onPointerDown = (event: MouseEvent) => { const onPointerDown = (event: MouseEvent) => {
if ( if (event.target instanceof HTMLSelectElement) {
handleSubmit();
} else if (
(event.target instanceof HTMLElement || (event.target instanceof HTMLElement ||
event.target instanceof SVGElement) && event.target instanceof SVGElement) &&
event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) && event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) &&

Loading…
Cancel
Save