-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
This is a bit of a mess.
The remove here is needed for linkedin, because clicking on the download button opens the download in a new tab.
The passwordEntered gets triggered for facebook, because the download happens in the same tab where the password was entered. This was added recently to fix the button blinking issue, as the onunload handler does not seem to get triggered (which is needed to call the iframe driver's next() function which would trigger passwordEntered. Originally, I replaced remove with passwordEntered which broke linkedin.
To properly fix this, we would need the following:
- attach fb-fetcher's
next()callback to something other thanonunload- -> we can remove the
passwordEnteredhere
- -> we can remove the
- instead of always calling
remove, find a way to only trigger it when the download was opened in a new tab. We could hardcode this into the fetcher config or perhaps pass a parameter{closeTab: true}toctx.redirectDownload(...) - the
try ... catchabove needs to stay for making the download-in-tab special case work together with fb's download-in-password-tab unless we want to do some (major?) refactoring here.