Skip to content

Commit

Permalink
fix(sheet): correctly remove resize handler
Browse files Browse the repository at this point in the history
fixes #4251
  • Loading branch information
nolimits4web committed Feb 27, 2024
1 parent b99ff7f commit ffb5c8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/components/sheet/sheet-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ class Sheet extends Modal {
$(document).on('keydown', onKeyDown);
}
$el.prevAll('.popup.modal-in').addClass('popup-behind');

app.on('resize', onResize);
if (sheet.params.scrollToEl) {
scrollToElementOnOpen();
Expand Down Expand Up @@ -710,8 +709,8 @@ class Sheet extends Modal {
if (sheet.params.swipeToStep || useBreakpoints) {
$el.removeClass('modal-in-swipe-step modal-in-breakpoint');
sheet.emit('local::_swipeStep', false);
app.off('resize', onResize);
}
app.off('resize', onResize);
if (sheet.params.closeOnEscape) {
$(document).off('keydown', onKeyDown);
}
Expand Down

0 comments on commit ffb5c8c

Please sign in to comment.