CEFSharp 输入 [颜色] 不显示对话框
CEFSharp input[color] not showing dialog
这个标题说明了一切。我是 运行 封装在 WPF 表单中的 CEFSharp。我的一个页面有一个输入 [color],虽然一切都在 Chrome 中工作,但当我使用我的 CEF WPF 表单访问此页面时,它不会加载颜色选择器对话框。
如果我绑定到将执行的输入 [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 来加载对话框?
还是其他原因?
经进一步调查,这是 Chromium 嵌入式框架中的一个未决问题,因此无法打开拾色器对话框。我将改用 jquery 插件。
有关未决问题的更多详细信息:https://bitbucket.org/chromiumembedded/cef/issues/899
这个标题说明了一切。我是 运行 封装在 WPF 表单中的 CEFSharp。我的一个页面有一个输入 [color],虽然一切都在 Chrome 中工作,但当我使用我的 CEF WPF 表单访问此页面时,它不会加载颜色选择器对话框。
如果我绑定到将执行的输入 [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 来加载对话框?
还是其他原因?
经进一步调查,这是 Chromium 嵌入式框架中的一个未决问题,因此无法打开拾色器对话框。我将改用 jquery 插件。
有关未决问题的更多详细信息:https://bitbucket.org/chromiumembedded/cef/issues/899