简体   繁体   English

如何知道所选的 Firefox 保存对话框选项?

[英]How to know the selected firefox save dialog option?

I am using angular 10 (typescript).我正在使用 angular 10(打字稿)。 With Firefox I encountered the necessity of knowing what option did I choose in the save dialog.使用Firefox 时,我遇到了知道我在保存对话框中选择了什么选项的必要性。 More details: Unlike chrome where a blob file is saved directly, Firefox force us to pass through the save dialog with the following available options:更多细节:与直接保存 blob 文件的 chrome 不同,Firefox 强制我们使用以下可用选项通过保存对话框:

  • open with打开用
  • Save File保存存档
  • Cancel取消
  • OK好的

Here is the firefox dialog I am speeking about [1]: https://i.stack.imgur.com/pkXps.png这是我正在谈论的 firefox 对话框 [1]: https : //i.stack.imgur.com/pkXps.png

My behavior (in code), after that user select the option that he wants, depends on the selected option.我的行为(在代码中),在用户选择他想要的选项之后,取决于所选的选项。

Is there any solution that informs me about the selected option.是否有任何解决方案可以通知我有关所选选项的信息。 If this is totally impossible, is there a possibility to force firefox, programatically, to perform the save without passing through the save dialog/popup.如果这完全不可能,是否有可能以编程方式强制 Firefox 在不通过保存对话框/弹出窗口的情况下执行保存。 Note disabling the save dialog through firefox setting would NOT be good solution.注意通过 Firefox 设置禁用保存对话框不是好的解决方案。

I wonder that not many people are interested in this issue !我想知道没有多少人对这个问题感兴趣!

Isn't this a classic issue ?这不是经典问题吗?

I have imagined that it interests lots of applications/websites to make some handling after user file save action, for example :我想象过很多应用程序/网站在用户文件保存操作后进行一些处理,例如:

1 - disabling save button until the user makes some new changes. 1 - 禁用保存按钮,直到用户进行一些新的更改。

2 - allow the user to leave with/without asking about unsaved changes. 2 - 允许用户在询问/不询问未保存的更改的情况下离开。

... ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM