Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ScreenshotMetadata drag drop #843

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dotnet/Cef/CefCustomDragHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public class CustomDragHandler : IDragHandler
{
public bool OnDragEnter(IWebBrowser chromiumWebBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask)
{
if (dragData.IsFile && dragData.FileNames != null && dragData.FileNames.Count > 0)
if (dragData.IsFile && dragData.FilePaths != null && dragData.FilePaths.Count > 0)
{
string file = dragData.FileNames[0];
string file = dragData.FilePaths[0];
if (!file.EndsWith(".png") && !file.EndsWith(".jpg") && !file.EndsWith(".jpeg"))
{
dragData.Dispose();
return true;
}

// forgive me father for i have sinned once again
AppApi.Instance.ExecuteAppFunction("dragEnterCef", dragData.FileNames[0]);
AppApi.Instance.ExecuteAppFunction("dragEnterCef", file);
dragData.Dispose();
return false;
}
Expand Down