PDA

View Full Version : [FIXED] TextField doesn't grow when text doesn't contain spaces



EvilOrange
23 Oct 2013, 7:41 AM
Ext version tested:

Ext 4.1.1
4.2.1
Browser versions tested against:

Chrome 30
IE9
DOCTYPE tested against:

<!html>
Description:If you enter long text without spaces to TextField with {grow:true}, then vertical scroller is appeared instead of growing textarea's size. During investigation I found, that result size is calculated via TextMetrics.measure() function. And it calculates size based on CSS styles and getBoundingClientRect() function.The issue that TextArea should have "word-break:break-all" CSS property and it property must be copied in bind() function in TextMetrics.
Steps to reproduce the problem:https://fiddle.sencha.com/#fiddle/14b
(https://fiddle.sencha.com/#fiddle/14b)The result that was expected:TextArea's size is expanded
The result that occurs instead:TextArea's size isn't expanded, scroller is appeared

Gary Schlosberg
24 Oct 2013, 1:49 PM
Thanks for the report! I have opened a bug in our bug tracker.

evant
24 Oct 2013, 3:20 PM
I agree that it should copy the word-break property over to the measurement element, but I don't agree that the textarea should have break-all as the default property. I think most people wouldn't want that behaviour.

EvilOrange
25 Oct 2013, 12:33 AM
I agree that it should copy the word-break property over to the measurement element, but I don't agree that the textarea should have break-all as the default property. I think most people wouldn't want that behaviour.
Hm, yes it seems that "break-word" instead of "break-all" is default property for usual textareas.
But for me it will be enough, if "work-break" will be copied :)