如何获得输入文件以在WKWebView中工作? [英] How can you get input file to work in a WKWebView?

查看:119
本文介绍了如何获得输入文件以在WKWebView中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当OSX应用程序中有WKWebView时,按<input type="file">按钮时,将无法从硬盘中选择文件.您将如何启用此功能?

When you have a WKWebView in an OSX application, when you press a <input type="file"> button, you can't select a file from your harddisk. How would you enable this feature?

听说您通常使用:

func webView(sender: WebView!, runOpenPanelForFileButtonWithResultListener resultListener: WebOpenPanelResultListener!)

这是WebUIDelegate的一部分,但是尽管您设置了self.webView.UIDelegate = self,它也不会被解雇.

Which is part of the WebUIDelegate but altho you set self.webView.UIDelegate = self it does not get fired.

推荐答案

这是WKWebView中的一个已知错误.

This is a known bug in WKWebView.

https://bugs.webkit.org/show_bug.cgi?id=137759

这篇关于如何获得输入文件以在WKWebView中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆