Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Defer Click Fix #30

azoff opened this Issue · 0 comments

1 participant


Hi Azoff,

first of all, great work on this. I have had an issue with the click event handling, though. I was able to solve it, so I wanted to share for future releases. Here goes:

deferClick: function(target) {
    var events ='events');
    if (events && && {
        events =;
        function(event) {
            event.preventDefault(); - >event.stopPropagation(); - >event.stopImmediatePropagation();
            function(i, event) {
        }); - >
    } else { - >'click',
        function(event) { - >event.preventDefault(); - >event.stopPropagation(); - >event.stopImmediatePropagation(); - >
        }); - >

I marked all new lines with -> arrows. To explain: I am using your script in combination with jqGrid. It allows you to select rows by clicking. The click event however is not on the dragging element (e.g. the ) but on the parent (). The previous code would only prevent click events for the element itself and reattach any previously detached click events. My extension always defers the click event, and stops propagation, so the click event won't be fired on parent elements.

Hope this helps.

@azoff azoff closed this issue from a commit
Jonathan Azoff fixed click deferrence on scrolltargets. Closes #30 817f785
@azoff azoff closed this in 817f785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.