Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8713] iOS: Label not resizing properly when in ScrollView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-09T07:42:24.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-09 API, Release 2.0.3
ComponentsiOS
Labelsapi, module_scrollview, qe-testadded, titanbeta
ReporterKetan Majmudar
AssigneeVishal Duggal
Created2012-04-12T19:43:42.000+0000
Updated2012-08-07T03:45:01.000+0000

Description

Scroll View Bug with font, a label view was not fully resizing correctly when in an scroll view, simple use cases didn't show any issues, the code worked on android too. It turns out that by adding a font property to the label view, causes the scaling / resizing engine to fail in its calculations and set the bounding box shorter than it should be. Test Case on Gist: https://gist.github.com/c3ddfe83c3b9943ae366 Run as is, and you will see all the text, uncomment the font property and you will see it stops short of the end of text.

Comments

  1. Ketan Majmudar 2012-04-12

    Also the code above will fail if you use this text string (even without adding the font property:) var text = "So many of today’s creative, technical, and cultural talent are, in one way or another, indebted to the little machine that plugged into the living room telly.We’re celebrating the Spectrum’s anniversary in HORIZONS, at the BFI: a rich blend of fun, memories, and future-gazing. Play some of your favourite games (you’re welcome to bring your Kempston interface and Quickshot II)."; There is definitely a bug here.
  2. Shannon Hicks 2012-04-18

    I looked at the code, and see a potential problem... your scrollview has a contentHeight:'auto'. I believe it should be Ti.UI.SIZE Try that?
  3. Ketan Majmudar 2012-04-18

    I think I've tried that, but that's not the issue. That code, when not in a tabbed environment works. But I will try modifying test when I'm behind a machine.
  4. Ketan Majmudar 2012-04-20

    This is a further bug, if you were to change the contentHeight property to Ti.UI.SIZE then the scroll bar disappears and the content area does not expand at all. I'm sure this shouldn't be the desired behaviour, but either way, contentHeight is not the issue here, the rendering of the view seems to be the problem, by not taking the tab and nav zones into account.
  5. Vishal Duggal 2012-04-27

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2089
  6. Max Stepanov 2012-05-22

    Customer is requesting 2.0.2 backport (TIMOB-9127)
  7. Michael Pettiford 2012-06-19

    Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK 2.1.0.v20120619142258 hash r5982b78e OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
  8. Shyam Bhadauria 2012-07-09

    Re-opening to edit label
  9. Neha Chhabra 2012-08-07

    verified on: 2.0.3.v20120806151610

JSON Source