tags:

views:

132

answers:

1

I have a YUI-Uploader lying in some Element, which is a jQueryUI-Draggable. After clicking the Uploader-Button which opens the File-Select-Dialog, the Draggable got a MouseDown-Event => is sticky at my mouse.

How can I prevent the YUI-Upload-Button from bubbling the MouseDown-Event?

In Webkit the Upload-Button (which is a transparent Flash-Object) seems to not even recognize the MouseDown-Event. How can I make sure its always the first to get the Event? some z-index-magic or so?

+1  A: 

You can probably fix the first issue by having your draggable not allow the container of the upload button to be a handle using the cancel option. So if your html is something like this:

<div class="drag">
    <p>whatever</p>
    <div class="upload" ></div>
</div>

Then your initialisation scripts should look something like this:

var dragger = $(".drag").draggable({ cancel: ".upload" });
var uploader = new YAHOO.widget.Uploader( "upload", "assets/buttonSprite.jpg" );

As for your second issue, I'm not really sure... sorry (although it is possible that the above might fix that too if there's some weird event swallowing going on).

Alconja