Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IME pop-up issues #3408

Merged
merged 12 commits into from
Oct 5, 2023
Merged

Fix IME pop-up issues #3408

merged 12 commits into from
Oct 5, 2023

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Sep 26, 2023

Fixes issue with the IME popups and emoji popups (fixes #1469, fixes #3404).

Adds cursor_position attribute to App, which widgets can set in order to inform Textual where the terminal cursor should be moved in screen-space. This is important because the location of the terminal cursor determines where the emoji and IME popups appear when typing in widgets that support text input.

  • Input
  • TextArea

Examples:

Input widget IME

image

TextArea widget IME

image

Emoji popup

image

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

@darrenburns darrenburns marked this pull request as ready for review September 27, 2023 14:15
Copy link
Contributor

@rodrigogiraoserrao rodrigogiraoserrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of questions that I'd love to have answered because you probably already thought of these things.

src/textual/widgets/_input.py Show resolved Hide resolved
src/textual/widgets/_input.py Show resolved Hide resolved
tests/text_area/test_selection.py Outdated Show resolved Hide resolved
@darrenburns darrenburns merged commit 864d671 into main Oct 5, 2023
23 checks passed
@darrenburns darrenburns deleted the input-ime-fix branch October 5, 2023 14:37
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.

Investigate cursor issue for CJK input Japanese text input is not rendered inline
3 participants