Comments (9)
SOLVED
If someone has the same bug, try to replace method OnEnable() from
private void OnEnable () {
if (_isMobileInputCreated) {
this.SetVisible (true);
}
}
to
private void OnEnable () {
base.Start();
StartCoroutine(InitialzieOnNextFrame());
}
and also replace method OnDisable() from
private void OnDisable() {
if (_isMobileInputCreated) {
this.SetFocus (false);
this.SetVisible (false);
}
}
to
private void OnDisable() {
RemoveNative();
}
It will work for everyone, just make sure that you make _inputObjectText.FontSize multiplication by ratio just once.
For instance, create a bool variable and make like this:
if (isFirstTime) {
isFirstTime = false;
_config.FontSize = ((float)_inputObjectText.fontSize) * ratio;
} else {
_config.FontSize = ((float)_inputObjectText.fontSize);
}
from umi.
- Noticed just right now that if you open notification panel - InputField will dissapear and you have to disable and enable InputField parent to make it visible. But it happens very rarely.
from umi.
There are many different cases with visibility, so you have to control visibility of inputfields by yourself. When application lost focus hide it and show when it return to user. There are special method for that SetVisible.
from umi.
Yes, I tried, I tried also make it visible in Update but unsuccessfully. It just stay invisible while I execute SetVisible(true) in Update.
from umi.
So, any idea how to fix it?
from umi.
I don't know..
I guess, this is architecture issue of your app, and no plugin
from umi.
Had same issue with DontDestroyOnLoad UI panels. @Almazikman's solution worked, but the overlay inputfield wasn't disappearing when I closed the panel after opening it more than once in different scenes. I added following public member which is called only for DontDestroyOnLoad panels, this is working now.
public void SetCustomVisibilityOff()
{
if (_isMobileInputCreated)
{
this.SetFocus(false);
this.SetVisible(false);
RemoveNative();
}
}
from umi.
Had same issue with DontDestroyOnLoad UI panels. @Almazikman's solution worked, but the overlay inputfield wasn't disappearing when I closed the panel after opening it more than once in different scenes. I added following public member which is called only for DontDestroyOnLoad panels, this is working now.
public void SetCustomVisibilityOff() { if (_isMobileInputCreated) { this.SetFocus(false); this.SetVisible(false); RemoveNative(); } }
From where you're calling this method??
from umi.
I added this method as a public member of MobileInputField.cs and am calling the method from a script attached to the DontDestroyOnLoad ui panels containing an inputfield whenever the panel needs to be closed.
from umi.
Related Issues (20)
- Orientation problems. [iOS] HOT 1
- Option to make text readonly HOT 2
- Changing InputField Content Type
- Native inputbox is slow to respond when updating visibility and when initializing
- Dark theme troubles
- Caret moving to beginning undesirably when SetTextData() is called.
- Is there a way to prevent appear the keyboard when scrolling? (For Android)
- Possible security issue HOT 4
- Cannot change input value from code HOT 1
- Input Field does not move with ScrollRect in Android build HOT 1
- Input Field does not adhere to UI Masks in Android build HOT 1
- iOS password keychain stopped working with iOS 15
- hide the suggestions list above the keyboard on Android and iOS?
- 隐藏输入框后的高度怎么计算
- Any plans to make it compatible with TextMeshPro Input? HOT 1
- issue with SetVisible is not showing the text if gameObject is deactivated and activated again
- OnShowKeyboard каждый раз присылает разное значение высоты клавиатуры HOT 1
- Pasting long text ends up looping OnReceivedData
- Exception: common.aar plugin with the same name and architecture was already added HOT 4
- Can't auto hide HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi.