SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

sap.m.RadioButtonGroup throws an uncaught exception when modifying itself on selection #3971

Closed ba-sap closed 6 months ago

ba-sap commented 6 months ago

OpenUI5 version: 1.71.61 (but appears to be in all versions)

Browser/version (+device/version): Chrome Version 121.0.6167.140 (Official Build) (64-bit)

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): (internal URL removed)

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Open the provided url
  2. Click on RB1 or RB2

What is the expected result? No unhandled exception

What happens instead? An unhandled exception

Any other information? (attach screenshot if possible)

ba-sap commented 6 months ago

The internal snippix url was removed, the snippix number is #496785.

ivoplashkov commented 6 months ago

Hello @ba-sap,

Thank you for sharing this finding. I've created an internal incident DINC0064975. The status of the issue will be updated here in GitHub.

Regards, Ivaylo

LidiyaGeorgieva commented 6 months ago

Hello @ba-sap ,

The issue is fixed and will be part of the new release of SAPUI5 (1.122).

Best Regards, Lidiya

ba-sap commented 6 months ago

Hi @LidiyaGeorgieva,

Will this be downported to 1.71? This is the codeline I need the fix delivered to.

Also, just curious, any reason you didn't just merge my PR? Your change is basically the same, but it seems like you are switching the variable from a boolean, to the dom ref itself:

var isRadioGroupSelected = this.aRBs && this.aRBs[iSelectedIndex] && this.aRBs[iSelectedIndex].getDomRef();

This might make more sense with your change:

var selectedRadioBtnDomRef = this.aRBs && this.aRBs[iSelectedIndex] && this.aRBs[iSelectedIndex].getDomRef();
...
// if focus is in the group - focus the selected element
if (selectedRadioBtnDomRef && hasFocusedRadioButton) {
    selectedRadioBtnDomRef.focus();
}

Cheers, Braden

LidiyaGeorgieva commented 6 months ago

Hello @ba-sap ,

The fix is downported to 1.71. We do not merge a pull requests directly in GitHub. This creates a commit history conflict with the internal repository.

Best Regards, Lidiya