Skip to content
Snippets Groups Projects
Commit 331ccee1 authored by Vadim Savchuk's avatar Vadim Savchuk
Browse files

EXT-8259 FIXED Fixed occasional truncation of the "More" link in expandable textboxes.

The bug seems to happen when the text contains trailing newlines.
So the workaround is to strip those newlines.
I use a workaround because a proper fix might require changing LLTextBase which is undesirable at this point.

Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/722/

--HG--
branch : product-engine
parent 96631f6d
No related branches found
No related tags found
No related merge requests found
...@@ -140,7 +140,13 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons ...@@ -140,7 +140,13 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons
// LLTextBox::setText will obliterate the expander segment, so make sure // LLTextBox::setText will obliterate the expander segment, so make sure
// we generate it again by clearing mExpanderVisible // we generate it again by clearing mExpanderVisible
mExpanderVisible = false; mExpanderVisible = false;
LLTextEditor::setText(text, input_params);
// Workaround for EXT-8259: trim text before rendering it.
{
std::string trimmed_text(text);
LLStringUtil::trim(trimmed_text);
LLTextEditor::setText(trimmed_text, input_params);
}
// text contents have changed, segments are cleared out // text contents have changed, segments are cleared out
// so hide the expander and determine if we need it // so hide the expander and determine if we need it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment