Skip to content

Commit

Permalink
Fix #11818: Dialog focus from link (#11819)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Apr 25, 2024
1 parent 72340c0 commit 92fc32b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,12 @@ PrimeFaces.widget.Dialog = PrimeFaces.widget.DynamicOverlayWidget.extend({
* @protected
*/
applyFocus: function() {
if (this.cfg.focus)
PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.jq, this.cfg.focus).trigger('focus');
if (this.cfg.focus) {
var $this = this;
PrimeFaces.queueTask(function() {
PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector($this.jq, $this.cfg.focus).trigger('focus')
}, 100);
}
else
PrimeFaces.focus(null, this.id);
},
Expand Down

0 comments on commit 92fc32b

Please sign in to comment.