I have a web application where I need to open a new tab, run some Python, then close the tab. The reason I'm doing it this way rather than redirecting to the previous page is because the users would like it to retain the search filters.
I'm using Firefox to test it, and I'm aware that Javascript won't close the window if it wasn't opened with Javascript; apparently the same is true if I run any Python functions, because the "cancel" button on the same tab works without any problems.
Things I have tried:
Is there any workaround for this? Making users manually close the new tab with the X button just feels like such an obnoxious way to do it, and this feels like it should be so simple to do.