Keep typing in the composer instead of the keyboard's fullscreen editor - #7555
Open
hayaksi1 wants to merge 1 commit into
Open
Keep typing in the composer instead of the keyboard's fullscreen editor#7555hayaksi1 wants to merge 1 commit into
hayaksi1 wants to merge 1 commit into
Conversation
On a short screen — landscape, or a large display size — the keyboard takes over the whole window with its extract editor. That editor is a plain text field of the IME's own: it shows none of the composer's mention pills, none of the reply being answered, and none of the room, and it is the reported cause of the composer appearing to swallow input. IME_FLAG_NO_EXTRACT_UI turns it off, so keystrokes go to the composer itself whatever the screen height. The rich text composer is a separate view owned by matrix-rich-text-editor and needs the same flag set there. Part of element-hq#2153.
Contributor
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content
When the window is short — landscape, or a large display size — the keyboard replaces the whole
screen with its extract editor. That editor belongs to the IME, not to us: it is a plain text field
with none of the composer's mention pills, none of the message being replied to, and none of the
room behind it. It is also what the report describes as the composer swallowing input.
Setting
IME_FLAG_NO_EXTRACT_UIon the plain-text composer turns it off, so what the user types goesto the composer itself whatever the screen height.
The rich text composer is
EditorEditText, owned by matrix-rich-text-editor, so it needs the sameflag set there; this only covers the plain-text one.
Motivation and context
Part of #2153. Honest limitation: the report is from 0.4.0, against the composer as it was before the
rewrite, and I could not reproduce the swallowed input on a current build — the "Direct Messages" in
its title looks like a red herring, since nothing in the composer branches on whether the room is a
DM. So treat this as removing the fullscreen editor because it is wrong for this composer, which also
removes the most likely cause of what was reported, rather than as a confirmed fix.
Tests
MarkdownTextInputTest— asserts the flag is set on the editor the composer creates. An IME flaghas no behaviour a unit test can drive, so this guards the setting rather than the outcome.
./gradlew :libraries:textcomposer:impl:testDebugUnitTest :libraries:textcomposer:impl:ktlintCheck :libraries:textcomposer:impl:detekt— green.Tested devices
Checklist