<Swing Dev> RFR: 8260719: Input method character moves with caret

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

<Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
I've fixed annoying behaviour of input methods in text components.
Code checks caret position before submitting composed text.

-------------

Commit messages:
 - 8260719: Input method character moves with caret

Changes: https://git.openjdk.java.net/jdk/pull/2337/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2337&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260719
  Stats: 16 lines in 1 file changed: 16 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2337.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2337/head:pull/2337

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Sergey Bylokhov-2
On Mon, 1 Feb 2021 18:16:12 GMT, Denis Konoplev <[hidden email]> wrote:

> I've fixed annoying behaviour of input methods in text components.
> Code checks caret position before submitting composed text.

@dmarkov20 please take a look

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Dmitry Markov-2
On Mon, 1 Feb 2021 22:06:06 GMT, Sergey Bylokhov <[hidden email]> wrote:

>> I've fixed annoying behaviour of input methods in text components.
>> Code checks caret position before submitting composed text.
>
> @dmarkov20 please take a look

If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Ichiroh Takiguchi-3
On Tue, 2 Feb 2021 12:35:52 GMT, Dmitry Markov <[hidden email]> wrote:

>> @dmarkov20 please take a look
>
> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.

I checked working behavior on Mac Catalina with Japanese IME.
I tried following steps:
1. Start KeyboardWindow from Terminal
2. Type "abcefg"
3. Turn on Japanese IME, type "ao" (Japanese Hiragana is displayed)
4. Click Terminal window
5. Click between "c" and "e" by mouse on KeyboardWindow to move caret. The caret is moved but **preedit is not committed**.
6. Press Space key, caret is moved to in front of Japanese "a"

Without patch, the caret is not moved.
I think preedit should be committed or canceled by step 5.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
On Tue, 2 Feb 2021 13:59:02 GMT, Ichiroh Takiguchi <[hidden email]> wrote:

>> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.
>
> I checked working behavior on Mac Catalina with Japanese IME.
> I tried following steps:
> 1. Start KeyboardWindow from Terminal
> 2. Type "abcefg"
> 3. Turn on Japanese IME, type "ao" (Japanese Hiragana is displayed)
> 4. Click Terminal window
> 5. Click between "c" and "e" by mouse on KeyboardWindow to move caret. The caret is moved but **preedit is not committed**.
> 6. Press Space key, caret is moved to in front of Japanese "a"
>
> Without patch, the caret is not moved.
> I think preedit should be committed or canceled by step 5.

I've reproduced this on ubuntu 20.04.1 LTS.

Also, according to https://youtrack.jetbrains.com/issue/JBR-1995 users have same problems on ubuntu 18.04.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
In reply to this post by Ichiroh Takiguchi-3
On Tue, 2 Feb 2021 13:59:02 GMT, Ichiroh Takiguchi <[hidden email]> wrote:

>> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.
>
> I checked working behavior on Mac Catalina with Japanese IME.
> I tried following steps:
> 1. Start KeyboardWindow from Terminal
> 2. Type "abcefg"
> 3. Turn on Japanese IME, type "ao" (Japanese Hiragana is displayed)
> 4. Click Terminal window
> 5. Click between "c" and "e" by mouse on KeyboardWindow to move caret. The caret is moved but **preedit is not committed**.
> 6. Press Space key, caret is moved to in front of Japanese "a"
>
> Without patch, the caret is not moved.
> I think preedit should be committed or canceled by step 5.

@takiguc, thanks for this scenario!
Maybe, you have an idea how to flush composed text on a click?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
In reply to this post by Dmitry Markov-2
On Tue, 2 Feb 2021 12:35:52 GMT, Dmitry Markov <[hidden email]> wrote:

>> @dmarkov20 please take a look
>
> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.

@dmarkov20, hi, thank for checking PR!
Since this bug appear on both Mac and Linux can locate fix at common code?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Dmitry Markov-2
In reply to this post by Dmitry Markov-2
On Tue, 2 Feb 2021 12:35:52 GMT, Dmitry Markov <[hidden email]> wrote:

>> @dmarkov20 please take a look
>
> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.

> @dmarkov20, hi, thank for checking PR!
> Since this bug appear on both Mac and Linux can locate fix at common code?

In that case it is OK to place the fix to common code. Please ensure that the fix does not cause any regressions on Windows.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Ichiroh Takiguchi-3
In reply to this post by Denis Konoplev-2
On Tue, 2 Feb 2021 14:51:37 GMT, Denis Konoplev <[hidden email]> wrote:

>> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.
>
> @dmarkov20, hi, thank for checking PR!
> Since this bug appear on both Mac and Linux can locate fix at common code?

@dekonoplyov,
I could not recreate this issue on Ubuntu 18.04.
I might use different system setting.
Could you show me the detail information ?
I assume root cause may be in Input Context side on macos...

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Ichiroh Takiguchi-3
In reply to this post by Denis Konoplev-2
On Tue, 2 Feb 2021 14:51:37 GMT, Denis Konoplev <[hidden email]> wrote:

>> If I got it right the problem takes place only on MacOS. I could not reproduce the issue on Windows. However the fix is located at common code. I would recommend moving it to Mac specific code.
>
> @dmarkov20, hi, thank for checking PR!
> Since this bug appear on both Mac and Linux can locate fix at common code?

@dekonoplyov ,
I'm very sorry. I should use Korean Hangul IM on Ubuntu.
I could recreate your issue, but it seems it was not fixed by your patch.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
On Wed, 3 Feb 2021 10:12:22 GMT, Ichiroh Takiguchi <[hidden email]> wrote:

>> @dmarkov20, hi, thank for checking PR!
>> Since this bug appear on both Mac and Linux can locate fix at common code?
>
> @dekonoplyov ,
> I'm very sorry. I should use Korean Hangul IM on Ubuntu.
> I could recreate your issue, but it seems it was not fixed by your patch.

Well, I guess I have to solve ubuntu issue and "commiting preedit on mouse click".
Should I close this PR?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Ichiroh Takiguchi-3
On Wed, 3 Feb 2021 17:06:32 GMT, Denis Konoplev <[hidden email]> wrote:

>> @dekonoplyov ,
>> I'm very sorry. I should use Korean Hangul IM on Ubuntu.
>> I could recreate your issue, but it seems it was not fixed by your patch.
>
> Well, I guess I have to solve ubuntu issue and "commiting preedit on mouse click".
> Should I close this PR?

@dekonoplyov ,
I think ubuntu Korean IM issue is related XIM spec. It may be limitation...
I have no idea about possibility for ibus...

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8260719: Input method character moves with caret

Denis Konoplev-2
On Thu, 4 Feb 2021 16:01:29 GMT, Ichiroh Takiguchi <[hidden email]> wrote:

>> Well, I guess I have to solve ubuntu issue and "commiting preedit on mouse click".
>> Should I close this PR?
>
> @dekonoplyov ,
> I think ubuntu Korean IM issue is related XIM spec. It may be limitation...
> I have no idea about possibility for ibus...

I haven't found a solution yet. I'm closing this PR. I'll open a new one if I find a fix for IM problems.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337
Reply | Threaded
Open this post in threaded view
|

<Swing Dev> Withdrawn: 8260719: Input method character moves with caret

Denis Konoplev-2
In reply to this post by Denis Konoplev-2
On Mon, 1 Feb 2021 18:16:12 GMT, Denis Konoplev <[hidden email]> wrote:

> I've fixed annoying behaviour of input methods in text components.
> Code checks caret position before submitting composed text.

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2337