[wp-trac] [WordPress Trac] #51621: jQuery Migrate throws error when an object is specified for the name parameter and number for the value parameter

WordPress Trac noreply at wordpress.org
Sun Oct 25 07:10:43 UTC 2020


#51621: jQuery Migrate throws error when an object is specified for the name
parameter and number for the value parameter
--------------------------------------+-------------------------
 Reporter:  mweichert                 |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  high                      |   Milestone:  5.6
Component:  External Libraries        |     Version:  trunk
 Severity:  major                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  javascript
--------------------------------------+-------------------------
Changes (by azaozz):

 * priority:  normal => high
 * focuses:  ui, javascript => javascript
 * component:  Script Loader => External Libraries
 * milestone:  Awaiting Review => 5.6


Old description:

> jQuery Migrate will treat the name as a string when a number is provided
> as the value. However, it shouldn't make that assumption.
>
> jQuery UI Slider will make a call to jQuery.fn.css like so:
>

> {{{
> jQuery.css({left: "100%", 300)
> }}}
>

> It does this when the animate setting is specified. See
> https://jsfiddle.net/mweichert/784kjmoh/17/
>
> jQuery UI Slider is used in this context by wp-color-picker / iris.
>
> Note, I've created an issue and pull request for jquery-migrate here:
> https://github.com/jquery/jquery-migrate/issues/404

New description:

 jQuery Migrate will treat the name as a string when a number is provided
 as the value. However, it shouldn't make that assumption.

 jQuery UI Slider will make a call to jQuery.fn.css like so:


 {{{
 jQuery.css({left: "100%"}, 300)
 }}}


 It does this when the animate setting is specified. See
 https://jsfiddle.net/mweichert/784kjmoh/17/

 jQuery UI Slider is used in this context by wp-color-picker / iris.

 Note, I've created an issue and pull request for jquery-migrate here:
 https://github.com/jquery/jquery-migrate/issues/404

--

Comment:

 @mweichert as @Clorith mentioned thank you for the bug report and the
 patch.

 Looking [https://github.com/jquery/jquery-
 migrate/issues/404#issuecomment-716054275 upstream] seems this will be
 resolved in jQuery Migrate very soon, probably before beta-2 next Tuesday.
 If not, I'm a +1 to commit to WP only while it is being resolved in
 Migrate.

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


More information about the wp-trac mailing list