Merge pull request #1561 from cefsharp/fix/support-drag-drop-from-input-fields

Added support for drag & drop from input fields
This commit is contained in:
Per Lundberg
2016-01-28 15:15:38 +02:00
+8 -2
View File
@@ -2,11 +2,12 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Internals;
using System;
using System.IO;
using System.Text;
using System.Windows;
using System.Windows.Input;
using CefSharp.Internals;
namespace CefSharp.Wpf.Internals
{
@@ -115,7 +116,12 @@ namespace CefSharp.Wpf.Internals
if (dragData.IsFragment)
{
dragData.FragmentText = (string)e.Data.GetData(DataFormats.Text);
dragData.FragmentHtml = (string)e.Data.GetData(DataFormats.Html);
var htmlData = (string)e.Data.GetData(DataFormats.Html);
if (htmlData != String.Empty)
{
dragData.FragmentHtml = htmlData;
}
}
return dragData;