From 6dd0aa805e6c338e2fc58215b5aa023ffceef579 Mon Sep 17 00:00:00 2001 From: "ben%netscape.com" Date: Fri, 2 Jun 2000 05:28:11 +0000 Subject: [PATCH] fix draggable scrollbars on mac --- xpfe/browser/resources/content/navigatorDD.js | 2 +- xpfe/global/resources/content/nsDragAndDrop.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/xpfe/browser/resources/content/navigatorDD.js b/xpfe/browser/resources/content/navigatorDD.js index 0a8600b15fa..85aed9ad3fc 100644 --- a/xpfe/browser/resources/content/navigatorDD.js +++ b/xpfe/browser/resources/content/navigatorDD.js @@ -287,7 +287,7 @@ var contentAreaDNDObserver = { if (textstring != "") htmlstring = "" + textstring + ""; else - return; + throw Components.results.NS_ERROR_FAILURE; break; } } diff --git a/xpfe/global/resources/content/nsDragAndDrop.js b/xpfe/global/resources/content/nsDragAndDrop.js index 0e7ee43b6fe..8ecf3919084 100644 --- a/xpfe/global/resources/content/nsDragAndDrop.js +++ b/xpfe/global/resources/content/nsDragAndDrop.js @@ -47,6 +47,8 @@ * // nsTransferable can determine whether * // or not to accept drop. **/ + +/** error codes **/ var nsDragAndDrop = { @@ -72,7 +74,16 @@ var nsDragAndDrop = { var flavourList = null; if (aDragDropObserver.onDragStart) - flavourList = aDragDropObserver.onDragStart(aEvent); + { + try + { + flavourList = aDragDropObserver.onDragStart(aEvent); + } + catch (e) + { + return; // not a draggable item, bail! + } + } if (! flavourList || flavourList.length < 1) return;