Currently retool does not allow using window.open or window.close method for closing the current tab.
What we are trying to achieve is this:
We click a button, a number of queries are executed and a notification is shown, after an interval we would like to close the current browser tab.
Is there any way to achieve this? I tried with:
utils.openUrl("https://,", { newTab: false, forceReload: true });
But at best it reloads to a dummy tab that we need to close manually
1 Like
Unfortunately, this does not work as Retool does not allow using window.open, window.close or window.location.href methods
DaVla
April 26, 2023, 2:41pm
4
Maybe an alternative approach to achieving this could be to use a URL redirect to a blank page that automatically closes itself after a certain amount of time
I already tried both these ChatGPT suggestions
After a while even that became repetitive with no solution.
utils.openUrl("https://,", { newTab: false, forceReload: true });
returns a promise but window
methods & setTimout
doesn't seem to work in Promise.then
or Promise.finally
either.
Tess
May 1, 2023, 8:42pm
6
Hi @Ammaraly I'm not aware of any solutions for this behavior but I will submit a feature request!
4 Likes
Hi @Tess , thanks for your response. I was hoping someone from Retool Team would notice this and add a feature request
It would be a great help for us as this is a required functionality in our use case ( closing the current tab after showing a success modal).
2 Likes
DavidD
December 2, 2023, 11:55am
8
any updates here @Tess ? thanks!
Tess
December 21, 2023, 4:46pm
9
Hi @DavidD Unfortunately, this hasn't been picked up yet Will post back here if the team is able to pick this up!
arle
August 19, 2024, 11:26pm
10
I would like to see this feature added too, please. Seems simple enough? Thank you!
1 Like