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

WordPress Trac noreply at wordpress.org
Sun Jan 22 20:47:19 UTC 2023


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

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


Comment:

 I'm now getting
 {{{
 Uncaught TypeError: this.element._trigger is not a function
     at $.<computed>.<computed>.open (wpdialog.js?ver=6.2-alpha-55114:20:17
 }}}
 errors.

 It looks like the custom jQuery UI `_trigger()` (note the `_`) is not
 correct here. Instead, using jQuery's `trigger()` works for both getting
 rid of the deprecation and doesn't throw that error.

 `trigger( 'focus' )` is actually also the functional equivalent to the
 shorthand `focus()`. My initial suggestion as bit overambitious here...

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


More information about the wp-trac mailing list