fix: cross-group selection incorrectly allowed in specific cases

This commit is contained in:
Clarence Chan 2024-08-14 16:47:20 -04:00
parent 3cfcc7b489
commit 8e76ba8237

View file

@ -6845,8 +6845,9 @@ class App extends React.Component<AppProps, AppState> {
// With shift-selection, we want to make sure that frames and their containing // With shift-selection, we want to make sure that frames and their containing
// elements are not selected at the same time. // elements are not selected at the same time.
if ( if (
!someHitElementIsSelected && event.shiftKey ||
!pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements (!someHitElementIsSelected &&
!pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements)
) { ) {
this.setState((prevState) => { this.setState((prevState) => {
const nextSelectedElementIds: { [id: string]: true } = { const nextSelectedElementIds: { [id: string]: true } = {