[wp-trac] [WordPress Trac] #56830: jQuery Migrate deprecation in wpdialog

WordPress Trac noreply at wordpress.org
Tue Jan 24 21:12:02 UTC 2023


#56830: jQuery Migrate deprecation in wpdialog
----------------------------+-------------------------
 Reporter:  TobiasBg        |       Owner:  audrasjb
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  6.2
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:  javascript
----------------------------+-------------------------
Changes (by audrasjb):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55134" 55134]:
 {{{
 #!CommitTicketReference repository="" revision="55134"
 Code Modernization: Fix a JS error in `wpdialog`.

 This changeset replaces `this.element._trigger('focus');` with
 `this.element.trigger('focus');` in `wpdialog` to fix a JS error
 introduced in [55052].

 Indeed, `this` inside the `open()` function of `wpdialog` refers to the
 jQuery UI widget, whereas `this.element` is the jQuery object of the DOM
 element. Thus, native jQuery methods need to be used, as `_trigger` is
 only defined on the jQuery UI widget.

 Follow-up to [55052].

 Props TobiasBg, audrasjb, shubham1gupta.
 Fixes #56830.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56830#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list