File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ document.addEventListener('DOMContentLoaded', function() {
88 event . stopPropagation ( ) ;
99 event . preventDefault ( ) ;
1010 OCP . Loader . loadScript ( 'firstrunwizard' , 'firstrunwizard-main.js' ) . then ( function ( ) {
11- OCA . FirstRunWizard . open ( ) ;
11+ OCA . FirstRunWizard . open ( {
12+ setReturnFocus : document . querySelector ( '[aria-controls="header-menu-user-menu"]' ) ?? undefined ,
13+ } ) ;
1214 OC . hideMenus ( function ( ) {
1315 return false ;
1416 } ) ;
Original file line number Diff line number Diff line change 2828 size =" normal"
2929 :has-next =" hasNext"
3030 :has-previous =" hasPrevious"
31+ :set-return-focus =" setReturnFocus"
3132 @close =" close"
3233 @next =" goToNextPage"
3334 @previous =" goToPreviousPage" >
@@ -110,6 +111,7 @@ export default {
110111 logoURL: imagePath (' firstrunwizard' , ' nextcloudLogo.svg' ),
111112 pageSlideDirection: undefined ,
112113 circleSlideDirection: undefined ,
114+ setReturnFocus: undefined ,
113115 }
114116 },
115117
@@ -147,14 +149,18 @@ export default {
147149 },
148150
149151 methods: {
150- open () {
152+ open ({ setReturnFocus }) {
153+ if (setReturnFocus) {
154+ this .setReturnFocus = setReturnFocus
155+ }
151156 this .page = 0
152157 this .showModal = true
153158 },
154159
155160 close () {
156161 this .page = 0
157162 this .showModal = false
163+ this .setReturnFocus = undefined
158164 axios .delete (generateUrl (' /apps/firstrunwizard/wizard' ))
159165 },
160166
You can’t perform that action at this time.
0 commit comments