jquery-confirm icon indicating copy to clipboard operation
jquery-confirm copied to clipboard

Jconfirm scroll flickering

Open Hardikraja opened this issue 4 years ago • 0 comments

jquery-confirm version: v3.x.x

I'm submitting a ... (check one with "x") [*] bug report [ ] feature request [ ] support request

Current behavior: This happens in some cases only, but not able to fix it.

this._timer = setInterval(function () { if (that.smoothContent) { var contentHeight = that.$content.outerHeight() || 0; if (contentHeight !== prevContentHeight) { prevContentHeight = contentHeight; } var wh = $(window).height(); var total = that.offsetTop + that.offsetBottom + that.$jconfirmBox.height() - that.$contentPane.height() + that.$content.height(); if (total < wh) { that.$contentPane.addClass("no-scroll"); } else { that.$contentPane.removeClass("no-scroll"); } } }, this.watchInterval);

It happens here, sometimes it goes to add class 'no-scroll' and next time removes 'no-scroll' class, that is how it goes in the loop and ending with the flickering of the confirm box.

the size of that.$content.height() gives two different values, it keeps changes every next time. and every 100 ms it's flickering.

note - it's very much variable, the screen size and your content length should match to the resolution to reproduce this bug.

Expected behavior: It should not flicker.

Hardikraja avatar Oct 04 '21 10:10 Hardikraja