Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Deselecting the InputField on mouse click

Discussion in 'UGUI & TextMesh Pro' started by amit1532, Oct 20, 2014.

  1. amit1532

    amit1532

    Joined:
    Jul 19, 2010
    Posts:
    305
    Hello, the new beta (21) has changed the behaviour of the InputField which I was relying on..
    When you select an InputField and then click on anything else beside that InputField, it will keep it selected.
    Im not sure if that is a bug or an expected behaviour (On web browsers for example it doesnt do it)

    Anyway, is there a way to set it back to the previous behaviour without checking mouse position when clicking... It should be builded inside the InputField
     
  2. jfarias

    jfarias

    Joined:
    Apr 8, 2014
    Posts:
    53
    +1 on this.

    I did notice that the inputfield is deselected if you click on another component that can be selected (inputfields, toggles, buttons, etc).
     
  3. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    are you saying that it now doesnt deselect now or that is does? OnDeselect has always Deactivated the inputfield and i've always had it deselect if you click elsewhere.
     
  4. jfarias

    jfarias

    Joined:
    Apr 8, 2014
    Posts:
    53
    On beta 19 it was deselecting when I clicked anywhere outside of the inputfield and now, on beta 21, it only deselects when selecting another component. When I click on the background, for example, the inputfield remains selected.

    This is my experience but I believe that's what amit1532 is saying.
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Thank you :). Could either of you submit a bug about this? its a rabbit hole i dont want to go down today as i see nothing in input that would have changed this so its the eventSystem.
     
  6. amit1532

    amit1532

    Joined:
    Jul 19, 2010
    Posts:
    305
    Exactly, sorry if I didn't explain myself good enough
     
  7. jfarias

    jfarias

    Joined:
    Apr 8, 2014
    Posts:
    53
    amit1532, go ahead and report the bug yourself please.

    I'm actually having a much bigger problem with the event system trying to update destroyed game objects that I'm trying to reproduce in a simpler project.
     
  8. amit1532

    amit1532

    Joined:
    Jul 19, 2010
    Posts:
    305
    Sent
     
    jfarias likes this.