Skip to content

Commit

Permalink
MonkeyPatch #12172
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 24, 2024
1 parent b62ac86 commit 8eb0428
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,32 @@ var Storage = {
}

App.init();

// #12172 monkeypatch for mobile
PrimeFaces.utils.registerResizeHandler = function(widget, resizeNamespace, element, resizeCallback, params) {

const unbindResizeHandler = function() {
$(window).off(resizeNamespace);
};

if (PrimeFaces.env.isTouchable(widget.cfg)) {
return {
unbind: unbindResizeHandler
};
}

widget.addDestroyListener(unbindResizeHandler);
widget.addRefreshListener(unbindResizeHandler);

$(window).off(resizeNamespace).on(resizeNamespace, params || null, function(e) {
if (element && (element.is(":hidden") || element.css('visibility') === 'hidden')) {
return;
}

resizeCallback(e);
});

return {
unbind: unbindResizeHandler
};
};

0 comments on commit 8eb0428

Please sign in to comment.