28 Aug 2014 1:41 AM #1
Unanswered: ComboBox DisplayValue too long
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
4 Sep 2014 7:55 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
7 Sep 2014 11:17 PM #3
"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)