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

Fixed TextInput Glitch #4237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aryanshridhar
Copy link
Member

@aryanshridhar aryanshridhar commented Aug 24, 2020

Fixes #4233

Adding GIFs :

Before

After
fix

Would love an review for it !

@aryanshridhar
Copy link
Member Author

Edited : Added GIFs comparing the changes

Copy link
Contributor

@Maskedman99 Maskedman99 left a comment

Choose a reason for hiding this comment

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

Use yarn instead of npm. We use yarn.lock instead of package-lock.json here.

When repeatedly pressed on SmartUrlInput , the keyboard
would relaunch everytime with each trigger casing a glitch look.

Fixed by explicitly blurring the focus on textinput
when keyboard is hidden , hence preventing its natural behaviour .

Fixes zulip#4233
@aryanshridhar
Copy link
Member Author

Oh yeah @Maskedman99 , I got to know this later and forgot to make changes here .
Updated the commit message as well according to what mentioned in the docs .

_keyboardDidHide = () => {
const { textInputRef } = this;
if (textInputRef) {
textInputRef.current.blur();
Copy link
Member Author

Choose a reason for hiding this comment

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

As of now , the keyboard doesn't hide when the user presses on textinput , instead it maintains its previous state . (As shown in GIF) .
Would love to change according to what makes more sense .

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.

SmartUrlInput TextInput Glitch
2 participants