Before we can answer that, we need to answer this question: Are we, as a library, guaranteeing the order of events as part of our API?
The spec and browsers do not guarantee the order of events and our ordering is more a side-affect of how we currently handle the events. Even with your bindFirst method you cannot guarantee that your event will be the first when finally triggered. Why is the bindFirst method necessary? Why don't you want other subscribers to know the event was triggered? Shouldn't those subscribers be prepared to check if a particular change actually happened or not for some events? -- Brandon Aaron On Fri, Feb 13, 2009 at 8:41 AM, Scott González <[email protected]>wrote: > We have a few places in jQuery UI where we need to prevent events from > occurring, e.g., preventing the click event after a drag. We've been > partially successful by just binding a handler and the click event and > returning false. This can be improved by calling > event.stopImmediatePropagation(), but that won't prevent handlers bound > before ours from running. The only solution I can come up with is to force > our handler to be the first handler. With some help from Ariel, I've put > togheter some code ( http://codedumper.com/oxewu ) and I'm looking for > some feedback. Is there some other way we can prevent event handlers from > running? Are there still caveats like native onclick events? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
