Skip to content

Update RichInputConnection.java#2492

Open
julmez wants to merge 1 commit into
HeliBorg:mainfrom
julmez:patch-1
Open

Update RichInputConnection.java#2492
julmez wants to merge 1 commit into
HeliBorg:mainfrom
julmez:patch-1

Conversation

@julmez
Copy link
Copy Markdown

@julmez julmez commented May 13, 2026

Changed handling with cached text, for better working with apps like AFFiNE.

Please make sure you are at least reasonably close to the contribution guidelines: https://github.com/HeliBorg/HeliBoard/blob/main/CONTRIBUTING.md#guidelines
Due to maintainer availability, your PR may take quite some time to be addressed

Changed handling with cached text, for better working with apps like AFFiNE.
@julmez
Copy link
Copy Markdown
Author

julmez commented May 13, 2026

Hope it fix things like in these https://github.com/toeverything/AFFiNE/issues/13043

@Helium314
Copy link
Copy Markdown
Collaborator

Helium314 commented May 14, 2026

Can you give some information about what is working better, and how I can test it?
(Oh, the link is weirdly broken. What did you do?)

Is it really better than the cache reload in all situations? I remember testing that took quite some time.

@julmez
Copy link
Copy Markdown
Author

julmez commented May 15, 2026

Can you give some information about what is working better, and how I can test it? (Oh, the link is weirdly broken. What did you do?)

Is it really better than the cache reload in all situations? I remember testing that took quite some time.

Apologies for the broken link—simply copy and paste it, as usual. Unfortunately, I didn't have time for a full test (as I am currently away from home).
Here is the issue with my comments: toeverything/AFFiNE#14021

It appears that the keyboard is losing its correct position and attempting to correct this using cached text. However, this results in some strange behavior... The error message in the log reads: "Cached text out of sync."
Yesterday, I had the opportunity to test this. The general input behavior seems improved and smoother to me—particularly swipe input. However, the bug is still present. Of course, it is possible that the changes made have repercussions in other areas that are not yet known to me. It would therefore be desirable if this change were tested by more than one person.
I am not a keyboard expert, but it would be nice if I could use HeliBoard with AFFiNE as well. I noticed that this issue does not occur with the FUTO keyboard. Perhaps that helps.

@Helium314
Copy link
Copy Markdown
Collaborator

Which apps and actions did you test? You write "In some editors, due to batch edit, we will receive stale information after having just performed an action (e.g. deleted text)"

Your change breaks behavior when quickly deleting in both apps mentioned in the reload cache part (Joplin and com.farmerbb.notepad), which is not desirable.

I noticed that this issue does not occur with the FUTO keyboard

Most likely this is because FUTO doesn't use composing text as far as I know. Many browsers and browser-based apps go against behavior that is documented with "Editor authors:" advice for whatever reason, which resulted in keyboards giving up use of this.
I had plans for about 2 years to allow switching off composing text and still getting mostly normal behavior and suggestions, but there's like a million things to do so I didn't even find time to start investigating on this.

@Helium314
Copy link
Copy Markdown
Collaborator

Anyway, ideally the problemsm should be fixed in AFFiNE while leaving other apps in the mostly working state (there are still glitches in both apps I use for testing this).
But currently I don't even have an idea where to start...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants