File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,9 +104,11 @@ export class LayerManager {
104104 moveToDragLayer ( elem : IRenderedElement & IFocusableNode ) {
105105 this . dragLayer ?. appendChild ( elem . getSvgRoot ( ) ) ;
106106
107- // Since moving the element to the drag layer will cause it to lose focus,
108- // ensure it regains focus (to ensure proper highlights & sent events).
109- getFocusManager ( ) . focusNode ( elem ) ;
107+ if ( elem . canBeFocused ( ) ) {
108+ // Since moving the element to the drag layer will cause it to lose focus,
109+ // ensure it regains focus (to ensure proper highlights & sent events).
110+ getFocusManager ( ) . focusNode ( elem ) ;
111+ }
110112 }
111113
112114 /**
@@ -117,9 +119,11 @@ export class LayerManager {
117119 moveOffDragLayer ( elem : IRenderedElement & IFocusableNode , layerNum : number ) {
118120 this . append ( elem , layerNum ) ;
119121
120- // Since moving the element off the drag layer will cause it to lose focus,
121- // ensure it regains focus (to ensure proper highlights & sent events).
122- getFocusManager ( ) . focusNode ( elem ) ;
122+ if ( elem . canBeFocused ( ) ) {
123+ // Since moving the element off the drag layer will cause it to lose focus,
124+ // ensure it regains focus (to ensure proper highlights & sent events).
125+ getFocusManager ( ) . focusNode ( elem ) ;
126+ }
123127 }
124128
125129 /**
You can’t perform that action at this time.
0 commit comments