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

Input Fields treating tab different on different OS

Discussion in 'UGUI & TextMesh Pro' started by Antistone, Feb 21, 2015.

  1. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,833
    In a Linux standalone build, pressing the TAB key while typing in an input field actually adds a tab character to the field. (And pressing while the contents are highlighted overwrites the entire contents with a tab character.)

    In Windows standalone build, pressing TAB leaves the content of the input field unaltered. (And pressing while the contents are highlighted does not overwrite anything.)

    Tested with content types "standard" and "password".

    Which of these is expected behavior?

    How can I ensure that tab characters are not added to the input field on any platform? (I have a custom script that is detecting tabs and using them for navigation between fields.)
     
  2. diginikkari

    diginikkari

    Joined:
    Sep 3, 2014
    Posts:
    8
    I have noticed the same. I'm trying to implement tab-navigation and it's very difficult, because text is getting replaced by tab character in Linux.

    Have you found any solution for this?
     
  3. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,833
    I eventually got a reply from the Unity team saying that they reproduced the bug and intend to fix it...someday.

    I have a vague plan to try to work around it by having a script that listens for a value-change event, checks the value of the field, and sets the value to the same thing but with tabs removed. But I haven't gotten around to trying that yet because I've been working on other parts of the game.
     
  4. Metamorphy

    Metamorphy

    Joined:
    Dec 9, 2014
    Posts:
    1
    We get constant bug reports from Linux users about this!
     
  5. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Could you post your bug number for me? Thank you!
     
  6. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372