-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Flutter 3.19.4 | Android Specific | enableSuggestions = false
on TextField
causing emoji button to disappear.
#146540
Comments
I can reproduce the issue using the sample provided above. This appears to be caused by flutter/engine#46037 which fixed #71679 In native android, the same is seen when the flags in the PR are used. It appears that the visiblePassword flag might be disabling the emoji input since the noSuggestions flag by itself has the emoji option present. cc @bleroux to see if you have any idea what might fix this
android layout<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text=""
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:autofillHints=""
android:inputType="textNoSuggestions|textVisiblePassword" />
</androidx.constraintlayout.widget.ConstraintLayout> flutter doctor -v
|
@daksh-gargas Thanks for the detailed report. As pointed in flutter/engine#46037 description: Unfortunately, this behavior is specific to IMEs and as Daniel pointed the behavior is the same for a native app (removing TYPE_TEXT_VARIATION_VISIBLE_PASSWORD flag will make the emoji button visibile but it will also make GBoard displaying the suggestion bar). |
I agree with @bleroux, I think this is working as intended, unless someone can come up with the specific InputType flags we need to support. Maybe let's keep this open for now to gather feedback, but otherwise close it if no one has any suggestions after awhile. |
Same issue, also , flutter doctor -vDoctor summary (to see all details, run flutter doctor -v): • No issues found! [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.88.1) [✓] Connected device (3 available) [✓] Network resources • No issues found! |
Steps to reproduce
Use a
TextField
and setenableSuggestions
tofalse
.This will result in emoji button, which opens emoji keyboard, to disappear.
Not sure if Emojis have anything to do with suggestions.
Note:
Tried similar code on my older Flutter 3.13.4 version, and
enableSuggestions
have no impact. It doesn't even remove suggestions box. Seems like a bug back then and the fix must have also caused this side effect.Expected results
Emoji button should not disappear when suggestions are turned off
enableSuggestions: true
enableSuggestions: false
Actual results
enableSuggestions: true
enableSuggestions: false
Code sample
Code sample
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: