Upgraded from canjs 2.2.5 to canjs 2.3.28 and jquery v1.11.3 to jquery v3.4.1 and select box selection is not working

@justinbmeyer We have a helper function which creates the select box based on observe array of label-value pairs [{“label”: “”, value:“”}, {“label”: “”, value:“”}] and it also calls $option.attr(“selected”, “selected”) and $option.prop(“selected”, true) when label-value pairs value matches selected value. This approach used to work in canjs 2.2.5 but after upgrade to 2.3.28 it is not working.

The selected attribute on the option is getting set correctly but selection is not happening. see screenshot

It works

  1. When I pass a serialized array of label-value pairs instead of observer array of label-value pairs
    Or
  2. If we call $option.attr(“selected”, “selected”) within setTimeout with a delay of 500 it works, even with the observable array of label-value pairs

Below are screenshot of array of label-value pairs before and after upgrade

I am not sure how observe array of label-value pairs is causing selection not work

Were not sure how observable array is interfering with option selection

Hi @smoothlikejazz,

Thank you for reporting, we are taking a look at this issue, we will let know if something pops up.

@smoothlikejazz do you have a demo that shows a use-case about the error?
It will be great if you can share with us a github repo that help to understand the issue.

Thank you!