Closed stevenmunro closed 9 years ago
Sorry, I typed too soon. When the aggressive : true is set, modal.disable has no effect. Probably intended to work that way.
Can you pls share some code or way to reproduce this?
As per your docs
var _ouibounce = ouibounce(document.getElementById('ouibounce-modal'), {
aggressive: true,
timer: 0,
callback: function() { console.log('ouibounce fired!'); }
});
$('body').on('click', function() {
$('#ouibounce-modal').hide();
});
$('#ouibounce-modal .modal-footer').on('click', function() {
$('#ouibounce-modal').hide();
});
$('#ouibounce-modal .modal').on('click', function(e) {
e.stopPropagation();
});
_ouibounce.disable();
_ouibounce.disable(); has no effect if aggressive: true is set.
I don't think that's correct. Check out this test file: https://github.com/carlsednaoui/ouibounce/blob/master/test/index.html
You can load the page (make sure you're running it from a server), call _ouibounce.disable()
leave the window and nothing happens. Refresh the page, leave the window and ouibounce fires as expected.
Closing since I checked this on my end. Happy to re-open if what I described above doesn't work as expected.
I'm having the same issue. _ouibounce.disable(); is not working for me. Can you please check this again?
modal.disable(); // disable ouibounce, it will not fire on page exit
This doesn't appear to take effect. The modal still fires regardless.