On Fri, 18 Aug 2023 09:15:03 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:
>> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed unnecessary code > > modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8201: > >> 8199: >> 8200: // Since focus changes are atomic, we only fire change >> notifications after >> 8201: // all changes are committed on all old and new parents. > > Is it possible a user can interfere with this process by adding a listener to > `focusWithinProperty`? It fires events when it goes from `true` to `false` > and vice versa. I also noticed this code, which I think will not do the correct thing when `change` is not 1 or -1: void adjust(int change) { count += change; if (count == 1) { set(true); } else if (count == 0) { set(false); } } For example, if focus within currently is `false`, and it is "adjusted" by 5, the count goes from 0 to 5 in one go. It will remain `false` then. Is this intended? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1210#discussion_r1298217846