Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
-
Android (Chromebook)
Description
Sometimes Android draws a blue (highlight) overlay over the QtTextEdit (QtTextEdit.java) which is used behind the scenes to capture input method events for the QML TextEdit. This seems to occur especially in the case a hardware keyboard is used.
Note that this blue highlight does not move (or disappear) correctly in case the QML TextEdit is moved (or hidden).
Possible solution
Disable the default focus highlight in java (QtTextEdit.java):
public QtEditText(Context context, QtActivityDelegate activityDelegate) { ... if (android.os.Build.VERSION.SDK_INT >= 26) setDefaultFocusHighlightEnabled(false); ... }
The SDK version check is used as setDefaultFocusHighlightEnabled is introduced in API 26. I'm not sure if this problem occurs before this API version.
Another solution may be to avoid focussing the QtTextEdit in case a hardware keyboard is used. (see QtActivityDelegate.java: m_editText.requestFocus(); ). However this seems to be error prone in case the user switches between hardware and software keyboard.