Skip to content

Commit

Permalink
Fix primefaces#11700: Widgets with trigger/target bind for removal
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Apr 10, 2024
1 parent 87312d0 commit ac30e44
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ PrimeFaces.widget.Draggable = PrimeFaces.widget.BaseWidget.extend({
};

this.jqTarget.draggable(this.cfg);

// if the target is removed from the DOM we should destroy this widget
this.destroyOnElementRemoval(this.jqTarget);

this.addDestroyListener(function() {
if ($this.jqTarget.length) {
Expand Down Expand Up @@ -108,8 +105,6 @@ PrimeFaces.widget.Droppable = PrimeFaces.widget.BaseWidget.extend({
this.jqTarget = $(PrimeFaces.escapeClientId(this.cfg.target));

this.bindDropListener();
// if the target is removed from the DOM we should destroy this widget
this.destroyOnElementRemoval(this.jqTarget);

this.jqTarget.droppable(this.cfg);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ PrimeFaces.widget.KeyFilter = PrimeFaces.widget.BaseWidget.extend({
var nestedInput = $(':not(:submit):not(:button):input:visible:enabled:first', this.target);
this.applyKeyFilter(nestedInput, cfg);
}
// if the target is removed from the DOM we should destroy this widget
this.destroyOnElementRemoval(this.target);
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ PrimeFaces.widget.Menu = PrimeFaces.widget.BaseWidget.extend({
var $this = this;

this.trigger = PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.jq, this.cfg.trigger);

// if the trigger is removed from the DOM we should destroy this menu widget
this.destroyOnElementRemoval(this.trigger);

//mark trigger and descendants of trigger as a trigger for a primefaces overlay
this.trigger.data('primefaces-overlay-target', true).find('*').data('primefaces-overlay-target', true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ PrimeFaces.widget.Resizable = PrimeFaces.widget.BaseWidget.extend({
this._super(cfg);

this.jqTarget = $(PrimeFaces.escapeClientId(this.cfg.target));

// if the target is removed from the DOM we should destroy this widget
this.destroyOnElementRemoval(this.jqTarget);

this.renderDeferred();
},
Expand Down

0 comments on commit ac30e44

Please sign in to comment.