4 ms·
No. I want to be able to Ctrl-S and it save the changes I made to the file (for example, but this is the most annoying thing for me) That doesn't work with actu
by innocenat 6y ago
No. I want to be able to Ctrl-S and it save the changes I made to the file (for example, but this is the most annoying thing for me) That doesn't work with actual browser.
- modeless 6y agoYes it does. Just preventDefault() the keyDown event.
- Macha 6y agoAnd now you start a download and the modified file goes into the User's download folder as file(n).whatever instead of wherever they opened it from.
- modeless 6y agoNo, remember that you have a local server running native code. The server can handle writing the file to any path you want.
- innocenat 6y agoBut if you do that, you also have to handle file opening from the native local server side too (because browser file browser will not tell you actual file path). And of course, that dialog won't be a modal of the browser. This is getting weird very quickly (not to mention that Ctrl-S in browser windows saving file without confirmation is a UX I wouldn't want to use)
- modeless 6y ago> And of course, that dialog won't be a modal of the browser. There are several decent options. You could build a modal that displays a view of the file system sourced from the server. Or you could pop a real native file dialog from the server, and I'm betting it's possible to either make it a real modal of the browser window or do a good enough simulation depending on platform. Or in the future you could use the native file system API that is currently in origin trial. I submit that this is not weirder than most cross-platform UI toolkits that implement their own whacky replacements for the native file dialogs.