Results 1 to 3 of 3

Thread: ComboBox DisplayValue too long

  1. #1
    Sencha User
    Join Date
    Jun 2014
    Posts
    2
    Vote Rating
    0
      0  

    Default Unanswered: ComboBox DisplayValue too long

    Hi,

    i have a problem with a combobox and a very long displayvalue. After i select a value and the cursor moves to the end, the displayed value is at the end, but i need it to be at the first position.

    how can i achieve that without have to focus the box? i already tried, to override the onBeforeBlur of the ComboBox to move the caret to the start when i leave the box, but then i get a strange behavior when leaving the box.

    Do you have an idea how i get the displayvalue to be at the first position of the text when i leave the combobox?

    I am using ExtJS 4.2.1 and i need a solution for IE 9/10/11.

    Thanks for your help

    MO

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    You need to change the behavior when a value is selected, not when the field is blurred. When the field is blurred the caret isn't in the field anymore and the browser should then show the value from the start.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jun 2014
    Posts
    2
    Vote Rating
    0
      0  

    Default

    "the browser should then show the value from the start"

    that is exactly the problem, the box displays the value from the end and not the start

    i tried this solution (link) to move the cursor on select, but that did not work

    what i need is something to move the caret before the blur event, to get the caret back to the start when the box loses its focus (or before stop edit mode)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •