I am using jQuery BlockUI Plugin and I am having issues with firefox as blocking an element fires scroll event on that element and in my case I have other actions bind to element scroll and mess up my app logic.
Steps to Reproduce: Firefox Only 50+
- scroll div to end
- Press block-ui button to block element
- see console , div was scrolled
- unblocking element also causes scroll event
What I need : I want to avoid scroll event fired when element is blocked or unblocked. This only happens with firefox. WHY ??
JSFIDDLE: https://jsfiddle.net/bababalcksheep/1nv6znLg/36/
// print on scroll
$('#scroll-div').on('scroll', function(event) {
console.log('div scrolled');
});
//block
$('#btn-block').click(function(e) {
e.preventDefault();
$('#scroll-div').block({
'message': 'loading ...'
});
});
//unblock
$('#btn-unblock').click(function(e) {
e.preventDefault();
$('#scroll-div').unblock();
});