mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 10:54:33 +01:00 
			
		
		
		
	Text esc fixes (#925)
* fix incorrectly resetting state on esc * confirm text on esc
This commit is contained in:
		| @@ -47,6 +47,7 @@ export const actionFinalize = register({ | ||||
|             : "selection", | ||||
|         draggingElement: null, | ||||
|         multiElement: null, | ||||
|         editingElement: null, | ||||
|         selectedElementIds: {}, | ||||
|       }, | ||||
|     }; | ||||
|   | ||||
| @@ -92,13 +92,7 @@ export function textWysiwyg({ | ||||
|   editable.onkeydown = ev => { | ||||
|     if (ev.key === KEYS.ESCAPE) { | ||||
|       ev.preventDefault(); | ||||
|       if (initText) { | ||||
|         editable.innerText = initText; | ||||
|         handleSubmit(); | ||||
|         return; | ||||
|       } | ||||
|       cleanup(); | ||||
|       return; | ||||
|       handleSubmit(); | ||||
|     } | ||||
|     if (ev.key === KEYS.ENTER && !ev.shiftKey) { | ||||
|       ev.preventDefault(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Luzar
					David Luzar