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

Beginner Question - Focus on TextArea #80

Closed
simmihugs opened this issue Feb 13, 2022 · 4 comments
Closed

Beginner Question - Focus on TextArea #80

simmihugs opened this issue Feb 13, 2022 · 4 comments
Labels
bug Something isn't working correctly

Comments

@simmihugs
Copy link

TextArea does not allow me to type in it, unless I click with my Mouse into the Textarea.

My application has a TextField. When I set the focus to the TextField with SetFocusOnKey "textField1"
--> I can type in the TextField right away; As expected

My app also has a TextArea. When I set the focus to the TextArea with SetFocusOnKey "textArea1"
--> I cannot type in the TextArea unless I click with my Mouse into the TextArea
The TextArea, I did not change the the theme, has a blue border when it is on Focus, but there is no Cursor
--> blue border so it is focused

How do I make TextAreas accept input after receiving focus?

P.S. if there is a better way to ask trivial questions like this, let me know

@fjvallarino
Copy link
Owner

fjvallarino commented Feb 13, 2022

Hi! This is indeed a library issue. The problem is textArea is automatically wrapped by a scroll widget, so the nodeKey call assigns the key to scroll and not to textArea. Automatically adding the scroll wrapper causes some complications (such as this), but I think it's generally the expected behavior (otherwise, users would need to wrap the textArea manually).

I just pushed a new branch with a fix. You can test it by modifying your stack.yaml and adding these lines (commenting out the line with - monomer-1.3.0.0).

- git: https://github.com/fjvallarino/monomer.git
  commit: 68acc4c917f512eae143532388f80884bebe4b07

It's totally fine to ask usage questions here!

@simmihugs
Copy link
Author

simmihugs commented Feb 13, 2022

Hi @fjvallarino,
now it works as I expected, great thanks.

I'm not that familar with github - do I have to close this issue?

@fjvallarino
Copy link
Owner

Sure, you can close it if you feel the issue is fixed!

By the way, I just merged the PR to main and deleted the associated branch. Because of this, the commit hash you tested with does not exist anymore (if you try a clean build, it will fail because stack will not find the hash). The new hash from the main branch is 510de85d5c48d16d45464af96035b0221aca7b09 (this commit hash won't change/be removed).

This fix will be included whenever 1.4 is released, and I also hope to include the fix to the scroll thumb-size issue.

Thanks!

@simmihugs
Copy link
Author

Sounds good - looking forward to the 1.4 release

@fjvallarino fjvallarino added the bug Something isn't working correctly label Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants