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

editText.setBlurOnSubmit(false); #85

Open
fukemy opened this issue Nov 6, 2022 · 19 comments
Open

editText.setBlurOnSubmit(false); #85

fukemy opened this issue Nov 6, 2022 · 19 comments

Comments

@fukemy
Copy link

fukemy commented Nov 6, 2022

Hi today i suddenly got this problem

node_modules/react-native-autogrow-textinput/android/src/main/java/com/wix/autogrowtextinput/AutoGrowTextInputModule.java:55: error: cannot find symbol                 editText.setBlurOnSubmit(false);

can u help?

@banghia112
Copy link

Got this error too pls fix

@fukemy
Copy link
Author

fukemy commented Nov 7, 2022

any solution please? I did update any sdk like android sdk, target, react + react-native version? Really dont know why

@fukemy
Copy link
Author

fukemy commented Nov 7, 2022

@banghia112 setBlurOnSubmit now changed to setSubmitBehavior

@fukemy fukemy closed this as completed Nov 7, 2022
@fukemy
Copy link
Author

fukemy commented Nov 7, 2022

reopen for waiting pr fix

@fukemy fukemy reopened this Nov 7, 2022
@banghia112
Copy link

@fukemy please elaborate since its a different library, plus i didnt change or update react-native version

@fukemy
Copy link
Author

fukemy commented Nov 7, 2022

@fukemy
Copy link
Author

fukemy commented Nov 7, 2022

or you can use this solution instead of modify lib code:
https://stackoverflow.com/a/74333788/1308590

@banghia112
Copy link

or you can use this solution instead of modify lib code: https://stackoverflow.com/a/74333788/1308590

@fukemy thanks a lot, this solution fixed it for me (react native 0.63.4)

@olegmilan
Copy link

@fukemy provided workaround fixed this issue for me. Hopefully this change doesn't have some side effects, thanks

@augustosamame
Copy link

Unfortunately workaround gave me another error, even after gradlew clean: Execution failed for task ':app:checkReleaseDuplicateClasses'.

I'll try patching the library instead. A new fixed version would be much appreciated though.

@augustosamame
Copy link

This is part of a much larger issue: facebook/react-native#35210

@raldred
Copy link

raldred commented Feb 8, 2023

For RN 0.71, this will need patching as setBlurOnSubmit has gone.
We're using this patch with RN 0.71.2 which uses the new setSubmitBehavior method.

patches/react-native-autogrow-textinput+5.4.0.patch

diff --git a/node_modules/react-native-autogrow-textinput/android/src/main/java/com/wix/autogrowtextinput/AutoGrowTextInputModule.java b/node_modules/react-native-autogrow-textinput/android/src/main/java/com/wix/autogrowtextinput/AutoGrowTextInputModule.java
index 07c76d6..b2d1549 100644
--- a/node_modules/react-native-autogrow-textinput/android/src/main/java/com/wix/autogrowtextinput/AutoGrowTextInputModule.java
+++ b/node_modules/react-native-autogrow-textinput/android/src/main/java/com/wix/autogrowtextinput/AutoGrowTextInputModule.java
@@ -52,7 +52,7 @@ public class AutoGrowTextInputModule extends ReactContextBaseJavaModule {
                 if (param.hasKey("maxHeight") && !param.isNull("maxHeight")) {
                     mMaxHeight = dpToPx(param.getDouble("maxHeight"));
                 }
-                editText.setBlurOnSubmit(false);
+                editText.setSubmitBehavior("submit");
                 editText.setOnTouchListener(new View.OnTouchListener() {
                     @Override
                     public boolean onTouch(View v, MotionEvent event) {

@oviedo97fer
Copy link

Any suggestion for an app built with 0.62.2 RN version? I'm stuck on this

@raldred
Copy link

raldred commented Feb 28, 2023

Any suggestion for an app built with 0.62.2 RN version? I'm stuck on this

I think you best take a look at the notes on this issue
facebook/react-native#35210

@lfoliveir4
Copy link

or you can use this solution instead of modify lib code: https://stackoverflow.com/a/74333788/1308590

@fukemy thanks a lot, this solution fixed it for me (react native 0.63.4)

Work for me! 🏆

@Doko-Demo-Doa
Copy link

I have created a package that resolve this issue. It also includes Typescript typings:

https://github.com/Doko-Demo-Doa/react-native-autogrow-textinput-ts

@wiredmatrix
Copy link

Any solution to this error, I still experiencing it for weeks and have not been able to find working solution for it.

error: cannot find symbol
editText.setBlurOnSubmit(false);
^
symbol: method setBlurOnSubmit(boolean)
location: variable editText of type ReactEditText

@fukemy
Copy link
Author

fukemy commented Nov 11, 2023

Any solution to this error, I still experiencing it for weeks and have not been able to find working solution for it.

error: cannot find symbol

            editText.setBlurOnSubmit(false);

                    ^

symbol: method setBlurOnSubmit(boolean)

location: variable editText of type ReactEditText

🤣🤣🤣

@fukemy
Copy link
Author

fukemy commented Nov 11, 2023

change to setSubmitBehavior("blurAnd Submit")

mrcehlo added a commit to uppertools/react-native-autogrow-textinput that referenced this issue Aug 8, 2024
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

No branches or pull requests

9 participants