Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select onchange and apply #141

Open
DOWEBGit opened this issue Apr 11, 2024 · 4 comments
Open

Select onchange and apply #141

DOWEBGit opened this issue Apr 11, 2024 · 4 comments

Comments

@DOWEBGit
Copy link

DOWEBGit commented Apr 11, 2024

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

@johanneswilm
Copy link
Member

johanneswilm commented Apr 11, 2024

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.

@DOWEBGit
Copy link
Author

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!

@johanneswilm
Copy link
Member

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

@DOWEBGit
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants