mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 13:28:11 +08:00
Make the Text tool delete empty text layers when clicking away wth LMB (#2192)
Fix additions of layers when using left click Fixes: https://discord.com/channels/731730685944922173/881073965047636018/1327376421034922045
This commit is contained in:
@@ -172,8 +172,8 @@ export function createInputManager(editor: Editor, dialog: DialogState, portfoli
|
||||
}
|
||||
|
||||
if (!inTextInput && !inContextMenu) {
|
||||
const isRightClick = e.button === 2;
|
||||
if (textToolInteractiveInputElement) editor.handle.onChangeText(textInputCleanup(textToolInteractiveInputElement.innerText), isRightClick);
|
||||
const isLeftOrRightClick = e.button === 2 || e.button === 0;
|
||||
if (textToolInteractiveInputElement) editor.handle.onChangeText(textInputCleanup(textToolInteractiveInputElement.innerText), isLeftOrRightClick);
|
||||
else viewportPointerInteractionOngoing = isTargetingCanvas instanceof Element;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user