【问题标题】:CEFSharp input[color] not showing dialogCEFSharp输入[颜色]不显示对话框
【发布时间】:2016-05-25 13:49:40
【问题描述】:

这个标题说明了一切。我正在运行包装在 WPF 表单中的 CEFSharp。在我的页面中,我有一个 input[color],虽然一切都在 Chrome 中运行,但当我使用 CEF WPF 表单访问此页面时,它不会加载颜色选择器对话框。

如果我绑定到将执行的 input[color] 上的单击事件,但如果我将相同的代码附加到输入,或者更改它们不会执行的事件。我正在绑定一个 AngularJS 指令,如下所示: (注意:这已被剥离,$timeout 和 local.scope 将被使用,因此它们的存在)

    app.directive('myColorPicker', ['$timeout', function($timeout){
    return {
        restrict: "AE",
        replace: true,
        scope: {
            palette: '='
        },
        link: function(scope, elem) {
            elem.on('input', function(){
                var newColor = this.value;
                $(this).css({
                    "background-color":newColor,
                    "color":newColor
                });
            });
        }
    }
}])

在 WPF 中,我将 CEFSharp 设置如下:

var cefSettings = new CefSettings();
cefSettings.SetOffScreenRenderingBestPerformanceArgs();
cefSettings.CachePath = tempPath;
cefSettings.LogFile = tempPath + "chromium.log";
cefSettings.LogSeverity = LogSeverity.Default;
cefSettings.CefCommandLineArgs.Add("num-raster-threads", "4");
cefSettings.CefCommandLineArgs.Add("enable-experimental-canvas-features", "1");
Cef.Initialize(cefSettings, shutdownOnProcessExit: true, performDependencyCheck: true);

(让我知道您是否需要更多信息)。

所以我的问题是:是否有允许 Chromium 加载我不知道的颜色选择器对话框的设置?

或者是因为它被包裹在 WPF 中,从而阻止它调用 Windows 来加载对话框?

还是别的什么?

【问题讨论】:

    标签: c# angularjs wpf chromium-embedded cefsharp


    【解决方案1】:

    经过进一步调查,这是 Chromium Embedded Framework 中的一个未解决问题,因此无法打开“拾色器”对话框。我将改用 jquery 插件。

    关于未解决问题的更多详情:https://bitbucket.org/chromiumembedded/cef/issues/899

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-25
      • 2021-01-22
      • 2015-09-19
      • 2016-04-14
      • 2010-11-26
      相关资源
      最近更新 更多