File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/frontend/src/routes/(new-styling)/callback Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,10 @@ export const redirectInPopup = (url: string): Promise<string> => {
1515 ) ;
1616
1717 return new Promise < string > ( ( resolve , reject ) => {
18- // We need to throw an error when the window is closed, else the page and
19- // thus the user will wait indefinitely for a result that never comes.
20- //
21- // We can't listen to close events since the window is likely cross-origin,
22- // so instead we periodically check the closed attribute with an interval.
18+ // Monitor popup closure since cross-origin windows prevent close event
19+ // listening. We periodically check the closed attribute to detect when
20+ // the user closes the popup, allowing us to reject the promise instead
21+ // of waiting indefinitely for a result that will never arrive.
2322 const closeInterval = setInterval ( ( ) => {
2423 if ( redirectWindow ?. closed === true ) {
2524 clearInterval ( closeInterval ) ;
You can’t perform that action at this time.
0 commit comments