mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: incorrectly selecting linear elements on creation while tool-locked (#5785)
This commit is contained in:
parent
2e5c798c71
commit
e8fba43cf6
5 changed files with 22 additions and 7 deletions
|
@ -237,7 +237,7 @@ export const ShapesSwitcher = ({
|
|||
keyBindingLabel={`${numberKey}`}
|
||||
aria-label={capitalizeString(label)}
|
||||
aria-keyshortcuts={shortcut}
|
||||
data-testid={value}
|
||||
data-testid={`toolbar-${value}`}
|
||||
onPointerDown={({ pointerType }) => {
|
||||
if (!appState.penDetected && pointerType === "pen") {
|
||||
setAppState({
|
||||
|
|
|
@ -4836,10 +4836,6 @@ class App extends React.Component<AppProps, AppState> {
|
|||
} else {
|
||||
this.setState((prevState) => ({
|
||||
draggingElement: null,
|
||||
selectedElementIds: {
|
||||
...prevState.selectedElementIds,
|
||||
[draggingElement.id]: true,
|
||||
},
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ export const LockButton = (props: LockIconProps) => {
|
|||
onChange={props.onChange}
|
||||
checked={props.checked}
|
||||
aria-label={props.title}
|
||||
data-testid="toolbar-lock"
|
||||
/>
|
||||
<div className="ToolIcon__icon">
|
||||
{props.checked ? ICONS.CHECKED : ICONS.UNCHECKED}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue