openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Changing Property of RadioButton in FormContainer causes page to scroll

Open DeanDavis opened this issue 11 years ago • 5 comments

It's a little more complicated then the title suggests but still not favorable behavior. I have some radio buttons in one FormContainer and based on the state of those buttons I want to change the enabled property of some other radio buttons in a different form container. In my JSBin example choosing any radio button in the first group will change the "enabled" property of "Test 10" (rbTest10). This causes the screen to scroll/jump so that the radio button selected gets focused into the middle of the screen and the screen scrolls to do this. The screen should never scroll when choosing radio buttons. Once the first radio button is chosen and the enabled property of of rbTest10 is changed then choosing other radio buttons will no longer scroll the screen. Also, disabling the code that changes the enabled property of rbTest10 will also result in the screen not scrolling when radio buttons are chosen.

OpenUI5 version: Latest (see JSBin example)

Browser/version (+device/version): All I've tested on (Latest Chrome, Safari, Firefox)

URL: http://jsbin.com/xapizu/1/edit?html,output

User/password: none

Steps to reproduce the problem:

  1. Load JSBin example URL
  2. Choose any radio button in the first group (Test 1, Test 2, Test 3, Test 4, or Test 5)

What is the expected result? Choosing radio buttons, no matter what code is run behind should not cause the screen to scroll. That is unless that code is specifically designed to make the screen scroll.

What happens instead? Upon choosing, code will run that changes Test 10 to "enabled = false" This causes the screen to jump/scroll so that the radio button from step 2 gets focused into the middle of the screen. Choosing more buttons after this, the screen will no longer scroll because Test 10's enabled property is no longer effected.

Any other information? This only happens if the two radio buttons (the one chosen and running the code and the other who's property is effected by the code are in two different form containers).

DeanDavis avatar May 12 '15 15:05 DeanDavis

Hi DeanDavis, thank you for you excellent JSBin sample. Unfortunately, I still was not eble to reproduce the issue. In detail, I

  • opened the sample
  • Selected Radio Button 'Test 2' bur no scrolling was triggered. Everything was done in chrome on desktop Have I missed something?

Best Regards, Martin UI5 Dispatcher

machwitt avatar May 13 '15 13:05 machwitt

You have to make sure you don't scroll the screen all the way to the bottom or the jump scroll won't happen. Probably the easiest way is to load the JSBin and scroll down until the "Test 2" radio button is just visible at the bottom of the screen but you see no other radio buttons below it. Then select "Test 2". The screen should then jump scroll so that "Test 2" is physically centered in the screen. Also, I just slightly modified the JSBin code to toggle the enabled state of "Test 10" so now you can see the effect by clicking around on any of "Test 1" - "Test 5". As you click around that set of radio buttons the screen will jump scroll all the time. If you still can't see the effect please let me know and maybe we can hook up on a screen share session or I can do a video capture of my screen doing it and post it for viewing.

DeanDavis avatar May 13 '15 13:05 DeanDavis

Hi Dean, I really tried (IE+Chrome), but could not reproduce. I recorded it with a cam, maybe you can tell me what I should do in a different way? https://mdocs.sap.com/mcm/public/v1/open?shr=fdmsxtY-XFoI0TGIXQ10KlT_XE5h4jybh2Hzo2wrAIA

Regards Andreas

akudev avatar May 29 '15 13:05 akudev

Thanks for trying Andreas. But I see the reason you can't duplicate is that v1.28.7 of OpenUI5 fixed the behavior. Since the JSBin is referencing the latest release it then was fixed as well.

Thanks, Dean Davis

DeanDavis avatar May 29 '15 14:05 DeanDavis

Ok, thanks.

akudev avatar May 29 '15 14:05 akudev