Repository navigation
fix(desktop): answer WebKit JS dialog panels in the macOS shell - #275
Open
smarty-kiki wants to merge 1 commit into
Open
smarty-kiki wants to merge 1 commit into
smarty-kiki wants to merge 1 commit into
Conversation
打包态 macOS 壳的 WKWebView 从未设置 UIDelegate,WebKit 因此直接丢弃 JS 面板 请求:window.confirm() 静默返回 false。前端多处确认操作(团队黑板归档、删除 微信客服账号、禁用 API Key 等)表现为「点了确认毫无反应,请求也没发出」。 - 新增 StaffDeckWebViewUIDelegate,实现 alert/confirm/prompt 三个面板回调, 用 NSAlert 展示并把结果回传给 JS - 在 _create_macos_webview_window 里 setUIDelegate_,并用模块级引用兜住 WKWebView 的弱引用,避免代理被 GC 回收后再次静默失效 - 补回归测试:面板回调行为、空消息兜底、缺失 completion handler - 补 selector 注册测试(PyObjC 只注册能解析成 selector 的方法名)
This branch has not been deployed
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.
打包态 macOS 壳的 WKWebView 从未设置 UIDelegate,WebKit 因此直接丢弃 JS 面板 请求:window.confirm() 静默返回 false。前端多处确认操作(团队黑板归档、删除微信客服账号、禁用 API Key 等)表现为「点了确认毫无反应,请求也没发出」。