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

8074883: Tab key should move to focused button in a button group #212

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ktakakuri
Copy link
Contributor

@ktakakuri ktakakuri commented Dec 16, 2022

This is a backport of JDK-8074883: Tab key should move to focused button in a button group.

I would like to backport the patch to OpenJDK8u.
Original patch does not apply cleanly to 8u, because the fix uses a new API published in JDK9.

  • Since RequestFocusController only determines whether or not to set focus, I modified it so that requestFocus/requestFocusInWindow is called by SwingUtilities.invokeLater() and re-set focus and return false.
    Without invokeLater(), the focus returns to the first button in case of Cause.ACTIVATION.

  • ToggleButton.getGroupSelection() is defined as a package private method, because it must be called by JCompoennt.focusController.

  • Calling requestFocus()/requestFocusInWindow() will be processed as Cause.UNKNOWN.
    ToggleButton.getGroupSelection() returns itself, so no circular call occurs.

  • I moved Component.requestFocusController.acceptRequestFocus because RequestFocusContoroller is not called when Cause.ACTIVATION.

  • Only Swing components replace default RequestFocusController to JComponent.focusController.
    The focusController returns true except for Swing, so this change does not affect other components.

Testing:
build on Windows x86_64
java/awt, javax/swing and ButtonGroupFocusTest.java on Windows x86_64


Progress

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

Issue

  • JDK-8074883: Tab key should move to focused button in a button group (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/212/head:pull/212
$ git checkout pull/212

Update a local copy of the PR:
$ git checkout pull/212
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/212/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 212

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/212.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 16, 2022

👋 Welcome back ktakakuri! 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.

@ktakakuri ktakakuri changed the title Backport eef0714323de Backport 254d34cdf1fe6b33c720488513149889b0792c11 Dec 19, 2022
@openjdk openjdk bot changed the title Backport 254d34cdf1fe6b33c720488513149889b0792c11 8074883: Tab key should move to focused button in a button group Dec 19, 2022
@openjdk
Copy link

openjdk bot commented Dec 19, 2022

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Dec 19, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 19, 2022

Webrevs

@ktakakuri
Copy link
Contributor Author

Could someone please review this backport?

@mrserb
Copy link
Member

mrserb commented Dec 29, 2022

Looking into this fiix

@mrserb
Copy link
Member

mrserb commented Jan 6, 2023

It looks like this change caused a regression fixed by the JDK-8182577(probably some ofthe issues were fixed as well?), please chech that it is possible to backport it as well.

@ktakakuri
Copy link
Contributor Author

DefaultButtonModelCrashTest passed even before this backport was applied.
Does this mean that JDK-8182577 is already fixed in 8u?

@mrserb
Copy link
Member

mrserb commented Jan 14, 2023

One of the comment in the JDK-8182577 mentioned that that test works fine in jdk8 and failed since jdk9. So that was a regression, possibly caused by the change you requested to backport or maybe some other.

@ktakakuri
Copy link
Contributor Author

DefaultButtonModelCrashTest passed even after applying this backport.
Is there any proof needed?

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 13, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Contributor Author

@mrserb
Is there anything else that needs to be confirmed?

@mrserb
Copy link
Member

mrserb commented Feb 21, 2023

It needs to check why the same patch caused regression in jdk9, something is missing(not backported) in jdk8? If some other patch is missing we should try to backport it first, then backport this one, and then backport the JDK-8182577.

@ktakakuri
Copy link
Contributor Author

I issued a PR for JDK-8154043 and JDK-8182577.
#285
Thank you.

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 13, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Contributor Author

@mrserb
Could you please review the backport?
#285

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 5, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 3, 2023

@ktakakuri This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Jul 3, 2023
@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Jul 5, 2023
@openjdk
Copy link

openjdk bot commented Jul 5, 2023

@ktakakuri This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 2, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Oct 22, 2023
@openjdk
Copy link

openjdk bot commented Oct 22, 2023

@ktakakuri This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 20, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 18, 2023

@ktakakuri This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Dec 18, 2023
@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Dec 27, 2023
@openjdk
Copy link

openjdk bot commented Dec 27, 2023

@ktakakuri This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2024

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 21, 2024

@ktakakuri This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Feb 21, 2024
@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Apr 2, 2024
@openjdk
Copy link

openjdk bot commented Apr 2, 2024

@ktakakuri This pull request is now open

@openjdk
Copy link

openjdk bot commented Apr 2, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 30, 2024

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented May 28, 2024

@ktakakuri This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this May 28, 2024
@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Jun 7, 2024
@openjdk
Copy link

openjdk bot commented Jun 7, 2024

@ktakakuri This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 5, 2024

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 2, 2024

@ktakakuri This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Aug 2, 2024
@ktakakuri
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Aug 5, 2024
@openjdk
Copy link

openjdk bot commented Aug 5, 2024

@ktakakuri This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2024

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Contributor Author

This pull request is pending review of #285.
I comment to not close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport rfr Pull request is ready for review
3 participants