This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
GvrPointerInputModule blur behavior should match StandaloneInputModule, i.e. on click on another ISelectHandler — Incorrect handling of UI selection #966
Open
Description
Summary:
In Unity's UI system, a selection is made when the user clicks on a MonoBehaviour
implementing ISelectHandler
. In the builtin StandaloneInputModule
, a selection persists until the user clicks somewhere outside of the selected component. Using GvrPointerInputModule
, selected components are deselected as soon as the pointer moves outside the bounds of the component.
This makes it difficult to type into an InputField
, as the pointer must be hovering over the input for it to respond to keyboard events.
The problem appears to lie here. I suspect that the deselection behaviour should be moved into HandleTriggerDown
.
Found using:
- Google VR SDK version: 1.40.0
- Unity version: 2018.2.7f
Steps to reproduce the issue:
- In the HelloVR demo setup, create a canvas with a
GvrPointerRaycaster
containing anInputField
- Playing the scene, hover the pointer over the input field and click to select it
2a. Confirm that it's possible to type in the input field while the pointer is over it - Without clicking, move the pointer off of the input field
- Note that the input field deselects immediately, and that it's no longer possible to type in it