Skip to content

Commit 8b086ec

Browse files
Merge pull request #2572 from keveleigh/FocusBugFix
Fixed bug in BaseFocusHandler where wrong comparison was made
2 parents ed29f42 + 2ea2bea commit 8b086ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/MixedRealityToolkit-SDK/Features/Input/Handlers/BaseFocusHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public virtual void OnBeforeFocusChange(FocusEventData eventData)
5050
// If we're the new target object
5151
// Add the pointer to the list of focusers
5252
// and update our hasFocus flag if focusing is enabled.
53-
if (eventData.NewFocusedObject == this)
53+
if (eventData.NewFocusedObject == gameObject)
5454
{
5555
eventData.Pointer.FocusTarget = this;
5656
Focusers.Add(eventData.Pointer);
@@ -62,7 +62,7 @@ public virtual void OnBeforeFocusChange(FocusEventData eventData)
6262
}
6363
// If we're the old focused target object
6464
// update our flag and remove the pointer from our list.
65-
else if (eventData.OldFocusedObject == this)
65+
else if (eventData.OldFocusedObject == gameObject)
6666
{
6767
hasFocus = false;
6868

0 commit comments

Comments
 (0)