Trouble with droppable and div with overflow
Hi,
I have a unexpected behavior with the following code :
- <style>
- div
- {
- margin: 10px;
- }
- .droppable
- {
- background-color: red;
- }
- .draggable
- {
- background-color: green;
- }
- </style>
- <div id="divContainer" style="height: 100px; overflow: auto;">
- <div id="drop1" class="droppable" style="height: 500px">
- </div>
- </div>
- <div id="drop2" class="droppable" style="height: 50px;">
- </div>
- <div class="draggable" style="height: 50px;">
- </div>
- <script type="text/javascript">
- $('.draggable').draggable();
- $('.droppable').droppable({ drop: function (event, ui) { $(this).text('dropped'); } });
- </script>
When I drag the green div on the red div with id='drop2', the text 'dropped' is display on the div with id='drop1'.
Is it correct or is it a bug ? If it's normal, what changes can I make to fire the event on the div 'drop2' and not on 'drop1' ?
I'm using jquery 1.4.2, jquery ui 1.8.2. I tested on IE8 and Chrome 5.0 beta.
Thanks for your help.