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

8279140: ComboBox can lose selected value on item change via setAll #1452

Closed

Conversation

karthikpandelu
Copy link
Member

@karthikpandelu karthikpandelu commented May 7, 2024

The ComboBox value was not set to previously selected value in the item list change listener when setAll method is used to change the items. Fixed the issue by restoring the selection in this case.

Added a unit test to validate the fix.
JDK-8279139 is also fixed with this change and added a unit test for the same.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8279140: ComboBox can lose selected value on item change via setAll (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1452/head:pull/1452
$ git checkout pull/1452

Update a local copy of the PR:
$ git checkout pull/1452
$ git pull https://git.openjdk.org/jfx.git pull/1452/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1452

View PR using the GUI difftool:
$ git pr show -t 1452

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1452.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 7, 2024

👋 Welcome back kpk! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 7, 2024

@karthikpandelu This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8279140: ComboBox can lose selected value on item change via setAll

Reviewed-by: angorya

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 6 new commits pushed to the master branch:

  • b86e677: 8282999: Add support for EXT-X-MEDIA tag in HTTP Live Streaming
  • eb6d55f: 8328603: HLS video stream fails to render consistently
  • 7699c44: 8092102: Labeled: textTruncated property
  • d3da033: 8330462: StringIndexOutOfBoundException when typing anything into TextField
  • 35880ce: 8331616: ChangeListener is not triggered when the InvalidationListener is removed
  • 36e65e8: 8331214: Doc: update spec for SpinnerFactory classes

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Ready for review label May 7, 2024
@mlbridge
Copy link

mlbridge bot commented May 7, 2024

Webrevs

@karthikpandelu
Copy link
Member Author

I missed to validate the test case present in JDK-8279139 and looks like it is not yet fixed. Hence I will change this PR to draft for now

@karthikpandelu karthikpandelu marked this pull request as draft May 7, 2024 11:59
@openjdk openjdk bot removed the rfr Ready for review label May 7, 2024
@karthikpandelu karthikpandelu marked this pull request as ready for review May 9, 2024 09:34
@openjdk openjdk bot added the rfr Ready for review label May 9, 2024
@andy-goryachev-oracle
Copy link
Contributor

It looks like we have quite a few bugs related to different aspects of ComboBox. This change is definitely an improvement, as it fixes the scenario described in JDK-8279140.

This PR changes parts of the code that fixed JDK-8087838. While I don't see a regression in respect to JDK-8087838, I do see a different behavior with and without this fix in JDK-8090221, using the test app there (to be specific, with the fix in this PR, the tester in JDK-8090221 continues to display the selected item in the combo box even though the output shows Selected Item After: null

Do you think that JDK-8090221 scenario is a different case and should be addressed separately?

@karthikpandelu
Copy link
Member Author

Yes there are few bugs related to ComboBox.
I think we can fix JDK-8090221 separately. The issue JDK-8279139, which is closed as duplicate of this issue is fixed, but changing the test slightly shows another issue which is mentioned in JDK-8263942. Since we have different scenarios like these, we can fix these issue with these PRs one by one. So I believe other issues can be fixed separately.

Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. thank you for adding the tests!

@openjdk openjdk bot added the ready Ready to be integrated label May 15, 2024
@karthikpandelu
Copy link
Member Author

Thanks for reviewing @andy-goryachev-oracle

@karthikpandelu
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented May 15, 2024

Going to push as commit 88aad93.
Since your change was applied there have been 8 commits pushed to the master branch:

  • 97b1402: 8331748: Update libxml2 to 2.12.6
  • 581e3a7: 8329011: Update SQLite to 3.45.3
  • b86e677: 8282999: Add support for EXT-X-MEDIA tag in HTTP Live Streaming
  • eb6d55f: 8328603: HLS video stream fails to render consistently
  • 7699c44: 8092102: Labeled: textTruncated property
  • d3da033: 8330462: StringIndexOutOfBoundException when typing anything into TextField
  • 35880ce: 8331616: ChangeListener is not triggered when the InvalidationListener is removed
  • 36e65e8: 8331214: Doc: update spec for SpinnerFactory classes

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 15, 2024
@openjdk openjdk bot closed this May 15, 2024
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels May 15, 2024
@openjdk
Copy link

openjdk bot commented May 15, 2024

@karthikpandelu Pushed as commit 88aad93.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
2 participants