@@ -2830,7 +2830,7 @@ export class SurveyCreatorModel extends Base
2830
2830
clearTimeout ( this . currentFocusTimeout ) ;
2831
2831
this . currentFocusTimeout = setTimeout ( ( ) => {
2832
2832
this . currentFocusInterval = setInterval ( ( ) => {
2833
- const el = document . getElementById ( selEl . id ) ;
2833
+ let el = this . getHtmlElementForScroll ( selEl ) ;
2834
2834
if ( ! ! selEl && ( focus || startEdit && ( ! selEl . hasTitle || selEl . isPanel ) ) ) {
2835
2835
if ( ! el || this . rootElement . getAnimations ( { subtree : true } ) . filter ( ( animation => animation . effect . getComputedTiming ( ) . activeDuration !== Infinity && ( animation . pending || animation . playState !== "finished" ) ) ) [ 0 ] ) return ;
2836
2836
clearInterval ( this . currentFocusInterval ) ;
@@ -2845,7 +2845,7 @@ export class SurveyCreatorModel extends Base
2845
2845
SurveyHelper . scrollIntoViewIfNeeded ( el . parentElement ?? el , ( ) => { return scrollIntoViewOptions ; } , true ) ;
2846
2846
}
2847
2847
}
2848
- if ( ! propertyName && el . parentElement ) {
2848
+ if ( ! propertyName && el . parentElement && selEl . getType ( ) !== "matrixdropdowncolumn" ) {
2849
2849
let elToFocus : HTMLElement = ( typeof ( focus ) === "string" ) ? el . parentElement . querySelector ( focus ) : el . parentElement ;
2850
2850
elToFocus && elToFocus . focus ( { preventScroll : true } ) ;
2851
2851
}
@@ -2860,9 +2860,19 @@ export class SurveyCreatorModel extends Base
2860
2860
} , 100 ) ;
2861
2861
}
2862
2862
2863
+ private getHtmlElementForScroll ( element : any ) : HTMLElement {
2864
+ const id = element . getType ( ) === "matrixdropdowncolumn" ? element . colOwner . id : element . id ;
2865
+ return document . getElementById ( id ) ;
2866
+ }
2867
+
2863
2868
private getSelectedSurveyElement ( ) : IElement {
2864
2869
var sel : any = this . selectedElement ;
2865
2870
if ( ! sel || sel . getType ( ) == "survey" ) return null ;
2871
+
2872
+ if ( this . selectedElement . getType ( ) === "matrixdropdowncolumn" ) {
2873
+ return ( < any > this . selectedElement ) ;
2874
+ }
2875
+
2866
2876
return sel . isInteractiveDesignElement && sel . id ? sel : null ;
2867
2877
}
2868
2878
private onSelectingElement ( val : Base ) : Base {
0 commit comments