RFR: 8319880: JTextField text selection doesn't stop if ended during loss of window focus [v2]
Anass Baya
abaya at openjdk.org
Wed Dec 3 10:46:26 UTC 2025
> **Analysis :**
> The issue is that on Win32, if the window is not active, we dont receive mouse events because we release the capture
> So the problem is the following:
> We start selecting text from the right to the extreme left.
> Then we switch to another window( the window lose focus ), and we release the mouse
> But when we return to the window, the caret drag is still active and does not stop. as the window did not recieved the mouse release event
>
> **Proposed fix:**
> In the Caret class, we added a logic to ignore the drag if the focus was lost due to window switching unless a new mouse press happens
Anass Baya has updated the pull request incrementally with one additional commit since the last revision:
Remove Extra line
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28582/files
- new: https://git.openjdk.org/jdk/pull/28582/files/e7deabc6..0d4722dc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28582&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28582&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28582.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28582/head:pull/28582
PR: https://git.openjdk.org/jdk/pull/28582
More information about the client-libs-dev
mailing list