File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { createAccordion } from './accordion';
55
66export const createModal = ( deps : {
77 translate : ( container : HTMLElement ) => void ;
8+ isEmbed : boolean ;
89 onClose : ( ) => void ;
910} ) : Modal => {
1011 const overlay = document . querySelector ( '#overlay' ) as HTMLElement ;
@@ -21,7 +22,7 @@ export const createModal = (deps: {
2122 isAsync = false ,
2223 onClose = ( ) => undefined ,
2324 scrollToSelector = '' ,
24- autoFocus = true ,
25+ autoFocus = ! deps . isEmbed ,
2526 } : ModalOptions = { } ,
2627 ) => {
2728 modal . className = size ;
Original file line number Diff line number Diff line change @@ -5003,7 +5003,15 @@ const changeAppLanguage = async (appLanguage: AppLanguage) => {
50035003
50045004const basicHandlers = ( ) => {
50055005 notifications = createNotifications ( ) ;
5006- modal = createModal ( { translate : translateElement , onClose : ( ) => getActiveEditor ( ) . focus ( ) } ) ;
5006+ modal = createModal ( {
5007+ translate : translateElement ,
5008+ isEmbed,
5009+ onClose : ( ) => {
5010+ if ( ! isEmbed ) {
5011+ getActiveEditor ( ) . focus ( ) ;
5012+ }
5013+ } ,
5014+ } ) ;
50075015 split = createSplitPanes ( ) ;
50085016 typeLoader = createTypeLoader ( baseUrl ) ;
50095017
You can’t perform that action at this time.
0 commit comments