mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
drop onKeyDown if shift is down and element is resizing
This commit is contained in:
parent
dd220bcaea
commit
606c647e3d
1 changed files with 4 additions and 1 deletions
|
@ -3543,8 +3543,11 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
// Input handling
|
// Input handling
|
||||||
private onKeyDown = withBatchedUpdates(
|
private onKeyDown = withBatchedUpdates(
|
||||||
(event: React.KeyboardEvent | KeyboardEvent) => {
|
(event: React.KeyboardEvent | KeyboardEvent) => {
|
||||||
|
if(this.state.resizingElement && event.shiftKey) {
|
||||||
|
event.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// normalize `event.key` when CapsLock is pressed #2372
|
// normalize `event.key` when CapsLock is pressed #2372
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"Proxy" in window &&
|
"Proxy" in window &&
|
||||||
((!event.shiftKey && /^[A-Z]$/.test(event.key)) ||
|
((!event.shiftKey && /^[A-Z]$/.test(event.key)) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue