diffDOM icon indicating copy to clipboard operation
diffDOM copied to clipboard

Select onchange and apply

Open DOWEBGit opened this issue 1 year ago • 4 comments

There is a strange behavior with 'change' events on selects.

Essentially, when I click on the selects, the content changes successfully. However, if I then click on other buttons that also modify the content, including the 'selected="selected"' option, initially the selected options visibly change. But subsequently, upon clicking the buttons again, the selects do not change the selected option.

I've included three screenshots: the initial HTML situation, the result after clicking the button and the resulting HTML after the server applies changes.

The HTML has been modified correctly, but as you can see in the browser, the previous option remains. I've also tried with 'valueDiffing: true/false', but it doesn't make a difference.

I made an area where you can see the issue, go to http://temp6.fo7.doweb.site/admin

[email protected] useruser

then go to http://temp6.fo7.doweb.site/admin/private/pagesinternal/pages?UGFnaW5lSW50ZXJuZUlkPTQ1

open console

then for example select 2023 and select "Gennaio"

now click the double angle left and right -> you can see "2019" -> it should be "2023" like in the console

in the screen you can see.

initial state

1-before

response from server

2-fromserver

applied result

3-after-apply

what I see in the browser

4-browser-result

thank you

DOWEBGit avatar Apr 11 '24 09:04 DOWEBGit

Hey @DOWEBGit , I've logged in and it seems to be working correctly for me. When I select "2023" and "Gennaio", those values are shown in the browser and also in the HTML DOM element that shows up in the console they are marked as "selected". I don't see "2019" show up anywhere.

Maybe I just didn't fully understand what is missing. Feel free to make a minimal example on jsfiddle or similar. Maybe that will make it easier for me to understand what is going on.

johanneswilm avatar Apr 11 '24 10:04 johanneswilm

Thank you,

You understood what I meant. I have recorded a video where you can see that at the end it shows '2019'."

screen-capture.webm

Thank you!

DOWEBGit avatar Apr 11 '24 11:04 DOWEBGit

Hey, I would need a minimal example with the entire code in order to fully understand what is going on there.

johanneswilm avatar Apr 15 '24 19:04 johanneswilm

Try to login in the app, go to console and you can see the html of the two div that can try to merge.

DOWEBGit avatar Apr 16 '24 10:04 DOWEBGit