Double-clicking bubbles results in a persistent bubble and undesirable behavior
Closed this issue · 3 comments
Just clarifying/confirming this issue. Since bubbles are triggered by each subsequent click, as many bubbles will appear as the times one clicks (until all bubbles have been displayed). That is to say, so long as there are 3 bubbles remaining, a triple click will expose three more bubbles, 4 clicks will display 4 bubbles etc etc. To resolve the issue, consider adding code that checks the display status of the previous bubble before a new one is displayed (i.e., only show the next bubble on click if the previous bubble is hidden). This might be helpful: http://stackoverflow.com/questions/178325/testing-if-something-is-hidden-with-jquery
Thanks guys, i'll look at a solution for this
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');
}
});