Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue #2 #3

Closed
wants to merge 1 commit into from
Closed

Fixed Issue #2 #3

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 22, 2012

Hi! Check the fix on my fork. It works for me.

Fixed Issue #2: Double-clicking bubbles results in a persistent bubble
and undesirable behavior
$grumble.click(function(ev){
ev.stopImmediatePropagation();
if (!$(this).data('CrumbleClick')){
$(this).data('CrumbleClick', true);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jQuery dblclick event fires click twice. Checking if click was fired.

@ghost ghost closed this Nov 22, 2012
@ghost
Copy link
Author

ghost commented Nov 22, 2012

Sorry for the quick & messy fork. Try this fix:

$grumble.click(function(ev){
    ev.stopImmediatePropagation();
    // jQuery dblclick event fires click event twice.
    // So, we need to check manually if click was already fired saving current timestamp.
    var lastClick = parseInt($(this).data('CrumbleLastClick'));
    if (isNaN(lastClick)){
        lastClick = 0;
    }
    if (ev.timeStamp - lastClick > 300){
        $(this).data('CrumbleLastClick', ev.timeStamp);
        $current.trigger('hide.bubble');
    }
});

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants