File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -392,13 +392,18 @@ export class MultiselectControls {
392392 ! ( Blockly . getSelected ( ) instanceof MultiselectDraggable ) ) {
393393 // Blockly.getSelected() is not a multiselectDraggable
394394 // and selected block is not in dragSelection
395- for ( const draggable of this . multiDraggable . subDraggables ) {
396- draggable [ 0 ] . unselect ( ) ;
395+ if ( this . dragSelection . size > 1 ) {
396+ // Preserve multiselection when shift held on right click
397+ Blockly . common . setSelected ( this . multiDraggable ) ;
398+ } else {
399+ for ( const draggable of this . multiDraggable . subDraggables ) {
400+ draggable [ 0 ] . unselect ( ) ;
401+ }
402+ this . multiDraggable . clearAll_ ( ) ;
403+ this . dragSelection . clear ( ) ;
404+ this . lastSelectedElement_ = Blockly . getSelected ( ) ;
405+ inPasteShortcut . set ( this . workspace_ , false ) ;
397406 }
398- this . multiDraggable . clearAll_ ( ) ;
399- this . dragSelection . clear ( ) ;
400- this . lastSelectedElement_ = Blockly . getSelected ( ) ;
401- inPasteShortcut . set ( this . workspace_ , false ) ;
402407 }
403408 } else {
404409 // In multiselect mode
You can’t perform that action at this time.
0 commit comments