From c558c7da2207160cfa2ef14238e7295ab144cc3a Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Wed, 9 Oct 2002 02:42:03 +0000 Subject: [PATCH] #172650 r=mkaply, sr=blizzard OS/2 only - if the web page has no title, use the URL for drag/drop --- widget/src/os2/nsDragService.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widget/src/os2/nsDragService.cpp b/widget/src/os2/nsDragService.cpp index 0e441d40e26c..84ea54a39778 100644 --- a/widget/src/os2/nsDragService.cpp +++ b/widget/src/os2/nsDragService.cpp @@ -134,7 +134,10 @@ NS_IMETHODIMP nsDragService::InvokeDragSession(nsIDOMNode *aDOMNode, nsISupports { holder.Left(url, lineIndex); holder.Mid ( linkName, lineIndex + 1, (len/2) - (lineIndex + 1) ); - dragitem.hstrTargetName = DrgAddStrHandle(ToNewCString(linkName)); + if (linkName.Length() > 0) + dragitem.hstrTargetName = DrgAddStrHandle(ToNewCString(linkName)); + else + dragitem.hstrTargetName = DrgAddStrHandle(ToNewCString(url)); dragitem.hstrSourceName = DrgAddStrHandle(ToNewCString(url)); } }