microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Inconsistent keyboard triggering from TMP input field #10058

Closed Knaoinr closed 9 months ago

Knaoinr commented 3 years ago

Describe the bug

After dismissing the keyboard by any means other than tapping another surface (such as pressing the X or enter buttons), tapping another surface toggles the keyboard on instead of off.

In addition, the keyboard sometimes dismisses itself seemingly without any user trigger. I don't think this is an accidental tap of something in the background, because it experiences the same bug with everything being a keyboard trigger: Keyboard is shown -> Tap ground -> Keyboard is hidden -> Tap ground again -> Nothing happens Keyboard is shown -> Keyboard disappears -> Tap ground again -> Keyboard reappears

To reproduce

Steps to reproduce the behavior:

  1. Create a new scene and configure MRTK.
  2. Create a TMP input field from the right click menu.
  3. Convert the canvas that appears to MRTK, adding a NearInteractionTouchableUnityUI component as prompted, and scale that and the text field to a reasonable size.
  4. Compile & deploy.
  5. Trigger the keyboard, perhaps typing something, then press X.
  6. Air tap the floor.

Expected behavior

Your setup (please complete the following information)

Target platform (please complete the following information)

MaxWang-MS commented 3 years ago

Thanks for reporting the issue. Could you try reproducing the behavior of TMP input field in the MixedRealityKeyboardExample scene and let us know if the problem also appears there?

Knaoinr commented 3 years ago

It occurs for both types of input field in the MixedRealityKeyboardExample scene.

MaxWang-MS commented 3 years ago

The keyboard disappearing for no reason part is a Unity bug and is tracked here: https://issuetracker.unity3d.com/product/unity/issues/guid/1360514/

MilanPolle commented 2 years ago

This is the same problem I'm experiencing and it still happens with Unity 2020.3.24. It also happens in the MixedRealityKeyboard example. The keyboard will open and close right away, or it will close when you lower your hand, or while typing. Sometimes it opens right after closing it by pressing the x button or enter. I think it partly might have to do with phantom clicks being detected outside the keyboard. If closing by clicking outside the keyboard could be disabled, that might help. It seems like the problem gets worse with lower ambient light.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!