LivelyKernel / LivelyKernel/LivelyKernel
empty TextMorph grows uncontrollably under some conditions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 304
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Issue world: http://lively-web.org/issues/IssueTemplate.html
reported by AranLunzer:
The TextMorph growOrShrinkToFit() method, recently changed, now defines its desired size by adding padding to the size obtained from getTextExtent(). But if the morph is empty (and non-editable, therefore having no cursor) getTextExtent() returns the same value as getExtent(). The outcome is that on every call to growOrShrinkToFit(), the morph grows by its padding size.
See world http://lively-web.org/users/AranLunzer/text-resize-bug.html
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the TextMorph growOrShrinkToFit() method and inspect how it combines getTextExtent(), getExtent(), and padding for an empty, non-editable morph. Reproduce the behavior with the linked text-resize-bug world, then verify that repeated calls no longer increase the morph’s size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100