Search Issue Tracker

Won't Fix

Votes

4

Found in

5.4.0b19

Issue ID

802518

Regression

No

OnPointerUp is called when dragging mouse from the object which is a child of an InputField

UI

-

How to reproduce:
1. Open the attached project
2. Open and play Master scene
3. Click on each of the boxes in the demo project and drag the mouse off the box while still holding down the mouse button
4. Notice that the Red and Blue boxes return the OnPointerUp message immediately when dragging the mouse pointer off of them. Only the Green box works as expected because it is not a child of an InputField.

Comments (5)

  1. look001

    Feb 25, 2022 13:58

    Any reason why this wont be fixed?

  2. Bobby_F

    Jan 04, 2021 22:17

    Qoobit you are a life saver! Had the same issue and works perfect, for anyone else just make sure the OnDrag function is not throwing anything like right clicking the IDragHandler in VS automatically adds for you.
    Thanks for following up all these years later :)

  3. qoobit

    Nov 28, 2020 00:00

    If you add the IDragHandler and it's corresponding public void OnDrag(PointerEventData eventData) function, it fixes this behaviour. It's quite late but I hope it helps others running into this issue down the line.

  4. lightnarcissus

    Jan 29, 2018 15:08

    This is still an issue in 2017.3.0f3 for those concerned.

  5. DanVioletSagmiller

    Oct 27, 2016 20:42

    For a SORT-OF work around, you can use [if (input.GetMouseButton(0) return; ] at the beginning of the function call. However, the OnPointerUp will not trigger again. when you actually do release the mouse. Not a great solution, but it helped me work past it for the time being.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.