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 password visibility,keyboard overlap issues in LoginViewMobile and input focus issues in LoginViewMobile and SignUpViewMobile #248

Open
navaneeth0041 opened this issue Jan 28, 2025 · 3 comments · May be fixed by #254

Comments

@navaneeth0041
Copy link
Contributor

navaneeth0041 commented Jan 28, 2025

🐛 Describe the bug

Two UX issues were identified in the LoginViewMobile page:

  1. Password field was showing characters by default instead of being obscured
  2. On-screen keyboard was overlapping with input fields when focused, making text entry difficult.
  3. Keyboard closes automatically on pressing 'Done/Next' instead of moving focus to the next input field, disrupting the user flow during form completion

Sample code to reproduce the problem:

CustomTextField(
  controller: passwordController,
  text: 'Password',
  isSeen: !isSeen,  // Bug: Default value of isSeen was false, making password visible
  suffixIcon: IconButton(
    onPressed: () {
      setState(() {
        isSeen = !isSeen;
      });
    },
    icon: Icon(
      !isSeen ? Icons.visibility_off : Icons.visibility,
    ),
  ),
)

CustomTextField(
  controller: emailController,
  focusNode: emailFocusNode,
  text: 'Email',
  onFieldSubmitted: (_) {
    // Bug: Focus isn't being properly managed here
    FocusScope.of(context).requestFocus(passwordFocusNode);
  },
)

Expected Behavior

  1. Password field should be obscured by default
  2. Input fields should be visible and accessible when keyboard is open
  3. Pressing 'Done/Next' on keyboard should smoothly transition focus to the next input field without dismissing the keyboard

Actual Behavior

  1. Password characters are visible by default
  2. Keyboard overlaps with input fields
  3. Keyboard dismisses when 'Done/Next' is pressed instead of moving to the next field, requiring users to tap each field manually
WhatsApp.Video.2025-01-29.at.00.09.44.1.mp4
WhatsApp.Video.2025-02-05.at.21.42.14.mp4
@MahmoudHassan9
Copy link

MahmoudHassan9 commented Feb 3, 2025

can you asssign this to me ? @navaneeth0041

@navaneeth0041
Copy link
Contributor Author

navaneeth0041 commented Feb 4, 2025

can you asssign this to me ? @navaneeth0041

I already gave the pr solving this issue. If u have any suggestions on that please let me know.

@MahmoudHassan9
Copy link

switch focus between textfields

FocusNode textSecondFocusNode = new FocusNode();

TextFormField textFirst = new TextFormField(
  onFieldSubmitted: (String value) {
    FocusScope.of(context).requestFocus(textSecondFocusNode);
  },
);

TextFormField textSecond = new TextFormField(
  focusNode: textSecondFocusNode,
);

can you asssign this to me ? @navaneeth0041

I already gave the pr solving this issue. If u have any suggestions on that please let me know.

@navaneeth0041 navaneeth0041 changed the title Fix password visibility and keyboard overlap issues in LoginViewMobile Fix password visibility,keyboard overlap issues in LoginViewMobile and input focus issues in LoginViewMobile and SignUpViewMobile Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants