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

Creating an off_focus hook in TextBox2D #501

Merged
merged 5 commits into from
Jun 27, 2022

Conversation

ganimtron-10
Copy link
Contributor

To know when the user has completed editing in the TextBox2D, creating an on_blur hook.
Required in #499 .
Also changing the condition sequence in the handle_character function, because when we press "return" key instead of removing focus from the UI it adds the "\r" character to the message.

@ganimtron-10 ganimtron-10 changed the title Creating a on_blur hook in TextBox2D Creating an on_blur hook in TextBox2D Sep 18, 2021
@codecov
Copy link

codecov bot commented Sep 18, 2021

Codecov Report

Merging #501 (af1e522) into master (9b11a1b) will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
+ Coverage   89.05%   89.14%   +0.08%     
==========================================
  Files          54       54              
  Lines       11534    11541       +7     
  Branches     1130     1131       +1     
==========================================
+ Hits        10272    10288      +16     
+ Misses        962      957       -5     
+ Partials      300      296       -4     
Impacted Files Coverage Δ
fury/fury/ui/tests/test_elements.py 74.26% <0.00%> (+0.31%) ⬆️
fury/fury/ui/elements.py 88.07% <0.00%> (+0.77%) ⬆️

@Garyfallidis
Copy link
Contributor

Please use focus_in or focus_out instead of on_blur. Alternatively, off_focus/on_focus.

@Garyfallidis
Copy link
Contributor

A test is missing too.

@ganimtron-10 ganimtron-10 changed the title Creating an on_blur hook in TextBox2D Creating an off_focus hook in TextBox2D Oct 15, 2021
@ganimtron-10
Copy link
Contributor Author

Hey @skoudoro ,
I have updated the hook name and also added the tests for the same.
PTAL.
Thanks!

Copy link
Contributor

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

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

Thank you for this PR @ganimtron-10.

Looks good to me. merging

@skoudoro skoudoro merged commit 541e7c1 into fury-gl:master Jun 27, 2022
@ganimtron-10 ganimtron-10 deleted the textbox_hook branch June 27, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants