jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

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

Open ktakakuri opened this issue 2 years ago • 58 comments
trafficstars

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
  • [x] Change must not contain extraneous whitespace
  • [x] 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

Using Webrev

Link to Webrev Comment

ktakakuri avatar Dec 16 '22 10:12 ktakakuri

:wave: 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.

bridgekeeper[bot] avatar Dec 16 '22 10:12 bridgekeeper[bot]

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

openjdk[bot] avatar Dec 19 '22 01:12 openjdk[bot]

Webrevs

mlbridge[bot] avatar Dec 19 '22 01:12 mlbridge[bot]

Could someone please review this backport?

ktakakuri avatar Dec 26 '22 12:12 ktakakuri

Looking into this fiix

mrserb avatar Dec 29 '22 00:12 mrserb

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.

mrserb avatar Jan 06 '23 03:01 mrserb

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

ktakakuri avatar Jan 13 '23 09:01 ktakakuri

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.

mrserb avatar Jan 14 '23 04:01 mrserb

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

ktakakuri avatar Jan 16 '23 13:01 ktakakuri

@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[bot] avatar Feb 13 '23 17:02 bridgekeeper[bot]

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

ktakakuri avatar Feb 21 '23 02:02 ktakakuri

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.

mrserb avatar Feb 21 '23 22:02 mrserb

I issued a PR for JDK-8154043 and JDK-8182577. https://github.com/openjdk/jdk8u-dev/pull/285 Thank you.

ktakakuri avatar Mar 16 '23 08:03 ktakakuri

@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[bot] avatar Apr 13 '23 11:04 bridgekeeper[bot]

@mrserb Could you please review the backport? https://github.com/openjdk/jdk8u-dev/pull/285

ktakakuri avatar May 08 '23 06:05 ktakakuri

@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[bot] avatar Jun 05 '23 10:06 bridgekeeper[bot]

@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[bot] avatar Jul 03 '23 14:07 bridgekeeper[bot]

/open

ktakakuri avatar Jul 05 '23 06:07 ktakakuri

@ktakakuri This pull request is now open

openjdk[bot] avatar Jul 05 '23 06:07 openjdk[bot]

@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[bot] avatar Aug 02 '23 10:08 bridgekeeper[bot]

Where are we with this one? Is it waiting on #285?

gnu-andrew avatar Aug 07 '23 13:08 gnu-andrew

Yes, #285 needs to be merged first and then this PR.

ktakakuri avatar Aug 24 '23 06:08 ktakakuri

@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[bot] avatar Sep 21 '23 12:09 bridgekeeper[bot]

@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[bot] avatar Oct 19 '23 13:10 bridgekeeper[bot]

/open

ktakakuri avatar Oct 22 '23 23:10 ktakakuri

@ktakakuri This pull request is now open

openjdk[bot] avatar Oct 22 '23 23:10 openjdk[bot]

@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[bot] avatar Nov 20 '23 02:11 bridgekeeper[bot]

@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[bot] avatar Dec 18 '23 07:12 bridgekeeper[bot]

/open

ktakakuri avatar Dec 27 '23 05:12 ktakakuri

@ktakakuri This pull request is now open

openjdk[bot] avatar Dec 27 '23 05:12 openjdk[bot]