@@ -3108,7 +3108,7 @@ export class SurveyCreatorModel extends Base
3108
3108
clearTimeout ( this . currentFocusTimeout ) ;
3109
3109
this . currentFocusTimeout = setTimeout ( ( ) => {
3110
3110
this . currentFocusInterval = setInterval ( ( ) => {
3111
- const el = document . getElementById ( selEl . id ) ;
3111
+ let el = this . getHtmlElementForScroll ( selEl ) ;
3112
3112
if ( ! ! selEl && ( focus || startEdit && ( ! selEl . hasTitle || selEl . isPanel ) ) ) {
3113
3113
if ( ! el || this . rootElement . getAnimations ( { subtree : true } ) . filter ( ( animation => animation . effect . getComputedTiming ( ) . activeDuration !== Infinity && ( animation . pending || animation . playState !== "finished" ) ) ) [ 0 ] ) return ;
3114
3114
clearInterval ( this . currentFocusInterval ) ;
@@ -3123,7 +3123,7 @@ export class SurveyCreatorModel extends Base
3123
3123
SurveyHelper . scrollIntoViewIfNeeded ( el . parentElement ?? el , ( ) => { return scrollIntoViewOptions ; } , true ) ;
3124
3124
}
3125
3125
}
3126
- if ( ! propertyName && el . parentElement ) {
3126
+ if ( ! propertyName && el . parentElement && selEl . getType ( ) !== "matrixdropdowncolumn" ) {
3127
3127
let elToFocus : HTMLElement = ( typeof ( focus ) === "string" ) ? el . parentElement . querySelector ( focus ) : el . parentElement ;
3128
3128
elToFocus && elToFocus . focus ( { preventScroll : true } ) ;
3129
3129
}
@@ -3138,9 +3138,19 @@ export class SurveyCreatorModel extends Base
3138
3138
} , 100 ) ;
3139
3139
}
3140
3140
3141
+ private getHtmlElementForScroll ( element : any ) : HTMLElement {
3142
+ const id = element . getType ( ) === "matrixdropdowncolumn" ? element . colOwner . id : element . id ;
3143
+ return document . getElementById ( id ) ;
3144
+ }
3145
+
3141
3146
private getSelectedSurveyElement ( ) : IElement {
3142
3147
var sel : any = this . selectedElement ;
3143
3148
if ( ! sel || sel . getType ( ) == "survey" ) return null ;
3149
+
3150
+ if ( this . selectedElement . getType ( ) === "matrixdropdowncolumn" ) {
3151
+ return ( < any > this . selectedElement ) ;
3152
+ }
3153
+
3144
3154
return sel . isInteractiveDesignElement && sel . id ? sel : null ;
3145
3155
}
3146
3156
private onSelectingElement ( val : Base ) : Base {
0 commit comments