Closed
Conversation
ca47675 to
a0cf337
Compare
Member
|
Tauri 上的拖拽体验劣于 PWA。 由于一些限制,Webview 内 DOM 拖拽事件与 Tauri 文件拖拽严格互斥。编辑器内行、音节大量依赖拖拽编辑,不可能完全由 Tauri 接管。而若不接管,文件拖放时从 DOM 端无法获得其绝对路径,进而无法执行原生保存等操作。 未找到解决方案,且 Tauri 官方人员表示甚至没有很好的 workaround。见 tauri-apps/tauri#14055 这一 issue 提出了一个 workaround:DOM 上监听到拖拽时,让 Tauri 在这个窗口上放摆放一个等大、透明的窗口,由 Tauri 劫持其拖放事件,用于承接文件。这一 workaround 有些过于复杂了。 引入 Tauri 的初衷是希望能带来原生化的文件管理体验。现代 Chromium 浏览器的文件系统 API 已经可以做到直接从文件系统打开和保存,以及良好的拖放。考虑到 Tauri 既没能给出明显优于 PWA 的体验,又带来了大量复杂度与维护负担,因此暂不继续尝试 Tauri 集成。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加 Tauri 集成以便可以构建出桌面应用