mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix changing font when editing text
This commit is contained in:
parent
eff5871147
commit
7f4b72010e
2 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue