palantir/blueprint
在 GitHub 查看[EditableText] multiline EditableText doesn't grow to show all contents when it should
Open
#648 创建于 2017年2月8日
P3Package: coreType: bughelp wanted
描述
Bug report
- Package version(s): 3.5.1 (internal)
- Browser and OS versions: Chrome 57.0.2987.21 beta , OS X 10.11.6
Steps to reproduce
ReactDOM.render(
<div style={{ width: '100%', height: '100%' }}>
<EditableText
value='Put some really long string in here, something that takes up a few hundred pixels width.'
multiline={true}
/>
</div>,
document.body
);
Actual behavior
Bug A (having trouble reproing this again, will report back soon):
- Make the window very small so the text should reflow. Refresh the page.
- Click inside the
EditableText. - Click outside the
EditableText, and notice it resizes.
Bug B:
- Start with a large window.
- Resize the window down to be smaller than the text, notice it is truncated instead of reflowing.
- Click inside the
EditableText, notice that now reflows onto multiple lines properly.
Expected behavior
For (A), initial state should be sized automatically.
For (B), resizing the window (or, more generally, the container of EditableText) should cause it to reflow.
Notes:
- Calling
forceUpdateon anEditableTextref doesn't seem to help, only user interaction does AFAICT. - User interaction isn't possible if it's disabled, which leads to a permanently sad state.