jQuery UI Draggable Clone Focus

jQuery UI Draggable Clone Focus

Hi all.  I posted this on StackOverflow, but I haven't had much success yet, so I figured I'd post here for more eyes.  I'm trying to build a draggable/droppable folder-file view with jQuery UI, but I'm running into a problem with, what I believe is attributed to the helper.  Here is my code:

The HTML

  1.     <body>
  2.       <div id="topContainer">
  3.         <span>Parent Directory 1</span>
  4.       </div>
  5.       <span id="topFolder" class="folder">
  6.         <div class="drop">
  7.         </div>
  8.       </span>
  9.       <hr />
  10.       <div id="container" class="container">
  11.         <div class="dropzone">
  12.           <span>Parent Directory 2</span>
  13.         </div>
  14.         <div id="cont1" class="container">
  15.           <div class="dropzone">
  16.             <span>Folder 1</span>
  17.           </div>
  18.           <span id="folder1" class="folder">
  19.             <div class="drop">
  20.               <div class="drag">&nbsp;</div>
  21.               <div class="drag">&nbsp;</div>
  22.               <div class="drag">&nbsp;</div>
  23.               <div class="drag">&nbsp;</div>
  24.               <div class="drag">&nbsp;</div>
  25.               <div class="drag">&nbsp;</div>
  26.               <div class="drag">&nbsp;</div>
  27.               <div class="drag">&nbsp;</div>
  28.               <div class="drag">&nbsp;</div>
  29.               <div class="drag">&nbsp;</div>
  30.               <div class="drag">&nbsp;</div>
  31.               <div class="drag">&nbsp;</div>
  32.             </div>
  33.           </span>
  34.         </div>
  35.         <div id="cont2" class="container">
  36.           <div class="dropzone">
  37.             <span>Folder 2</span>
  38.           </div>
  39.           <span id="folder2" class="folder">
  40.             <div class="drop">
  41.             </div>
  42.           </span>
  43.         </div>
  44.         <div id="cont3" class="container">
  45.           <div class="dropzone">
  46.             <span>Folder 3</span>
  47.           </div>
  48.           <span id="folder3" class="folder">
  49.             <div class="drop">
  50.             </div>
  51.           </span>
  52.         </div>
  53.         <span id="mainFolder" class="folder">
  54.           <div class="drop">
  55.             <div class="drag">&nbsp;</div>
  56.           </div>
  57.         </span>
  58.       </div>
  59.     </body>

The jQuery
  1.     $(document).ready(function () {
  2.       var opts = {
  3.         helper: 'clone',
  4.         appendTo: 'body'
  5.         //appendTo: '#container'
  6.       };
  7.       $('div.drag').each(function () {
  8.         $(this).draggable(opts);
  9.       });
  10.     
  11.       $('.dropzone, #topContainer').droppable({
  12.         drop: function (e, ui) {
  13.           var clone = $(ui.draggable).clone();
  14.           clone.draggable(opts);
  15.           $(this).siblings('.folder').children('.drop').append(clone);
  16.           $(this).removeClass('over');
  17.         },
  18.         over: function (e, ui) {
  19.           $(this).addClass('over');
  20.         },
  21.         out: function (e, ui) {
  22.           $(this).removeClass('over');
  23.         }
  24.       });
  25.     });

The CSS
  1.     .dropzone {
  2.         height: 300px;
  3.         width: 100px;
  4.         border: 1px solid black;
  5.     }
  6.     .drag {
  7.         clear: both;
  8.         height: 50px;
  9.         width: 80px;
  10.         background-color: black;
  11.         position: relative;
  12.         cursor: pointer;
  13.     }
  14.     #topContainer, .dropzone {
  15.         height: 50px;
  16.         width: 300px;
  17.         border: 2px solid black;
  18.         text-align: center;
  19.     }
  20.     .folder .drag {
  21.         margin: 5px;
  22.     }
  23.     .container {
  24.         border: 2px solid blue;
  25.         margin: 10px;
  26.     }
  27.     .over {
  28.         background-color: yellow;
  29.     }    
  30.     #container {
  31.         width: 800px;
  32.         height: 600px;
  33.         overflow-y: scroll;
  34.         border-color: red;
  35.         position: relative;
  36.     }

The Fiddle: jsFiddle

So the idea is... you drag one of the black blocks to the desired folder (Parent Directory 1, Parent Directory 2, Folder 1, etc.).  That all seems to work fine.

What doesn't work fine is when the parent (#container) or body have an overflow.  If you click on a block to drag and try to mousewheel scroll, you can't... or if you keep trying, you sometimes can.  (It's not obvious with my screen resolution, but in the Fiddle code, there is a scrollbar for the #container element) I'm assuming this has something to do with the focus of where I'm appending the helper to.

Because I started thinking the latter, I started appending the helper to different locations.  With #container being the area I'm most interested in, I can append the helper there and get the scroll to work just fine (uncomment //appendTo: '#container' and comment out the appendTo: 'body').

However, this introduces another problem.  Now that I'm appending to the #container element, my block cannot be seen when it is dragged to the **Parent Directory 1** folder, which lead me to believe that there is just something wrong with helper.

Sure enough, if you don't user **helper: 'clone'**, you can scroll just beautifully.  This is not an option because I like having my clone there.  So I turn to y'all.  How can I fix my problem, and what exactly is going on?  Does anyone have any advice?  I'd love to hear it.

It's also good to note that I've tried setting the zIndex and stack options for the draggable, but no go.  I'm assuming I'll have to make a custom helper function, and make it aware of what it's currently being dragged over... but I'm hoping there's an easier fix.

Thanks!