Ok, I had a mess with it, and i'm totally lost. I need the onclick
event to fire when the link is clicked, and the drag should only
happen if the mouse is moved while the button is held down (at this
point I'd even settle on the drag just not working on the link at all
- there's plenty of other stuff in the div for the user to grab hold
of and drag). At the moment the onclick rarely actually fires.

I tried putting Event.stop(event) into the function in the onclick to
prevent the mouse activity bubbling to the parent with the drag, but
that just tells me that event is not defined (that's *when* the
onclick fires and the drag doesn't steal all the action).

How can I force the links to be the things that take the mouseclick -
rather than it's parent?

For the moment, I've given up and just made another part of the div
the drag handle, so no dragging happens on or near the link - but it's
not ideal - i want more of the div to be able to act as the drag
handle - surely this can't be so rare a question, but I can't find
anything in google to stop things bubbling this way around - it's all
about stopping the onclick firing when it shouldn't (if only!!)!

On Mon, Nov 10, 2008 at 2:52 PM, Hippyjim Starbrook
<[EMAIL PROTECTED]> wrote:
> Thanks Alex. I'm looking at it now. So I'm right in thinking the
> problem is due to the drag event being called before the onClick? Just
> trying to figure out whre I put the Event.stop(event) - can I include
> that in the sortable.create?
>
> On Mon, Nov 10, 2008 at 12:05 PM, Alex Mcauley
> <[EMAIL PROTECTED]> wrote:
>>
>> The bind's are bubbling up the DOM ... you need to look at Event.stop(event)
>> to stop this happening
>> ----- Original Message -----
>> From: "Hippyjim Starbrook" <[EMAIL PROTECTED]>
>> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
>> Sent: Sunday, November 09, 2008 8:58 PM
>> Subject: [Proto-Scripty] Href inside sortable dragging instead of clicking
>> intermittently, in IE7
>>
>>
>>>
>>> Hi
>>>
>>> I have two sortables that have divs as the draggable elements.
>>> Included in those divs are some anchor tags to make some buttons that
>>> call javascript functions elsewhere in the page.
>>>
>>> It all works fine in Firefox & Safari, but in IE7 it's a matter of
>>> luck if the link will accept clicks. Sometimes you click the link,
>>> sometimes the div acts like it's being dragged (it fades as per the
>>> start of the drag, but doesn't move). I've tried to click the mouse as
>>> quickly as possible, and holding it completely still, but it makes no
>>> difference.
>>>
>>> This is a showstopper for me, as IE is such a big part of my audience.
>>> Anyone got any suggestions?
>>>
>>> A similar (and possibly related_ problem. In the same page i have a
>>> draggable with a href link to "close" it using blindup in the handle.
>>> sometimes in IE clicking the link makes the draggable move up to the
>>> top left corner of the window, and the javascript to close the
>>> draggable doesn't fire.
>>>
>>> All help appreciated.
>>>
>>> Thanks
>>>
>>> >
>>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to