CopyableLabel: Avoid creating Flash movie for empty string
A label built for an empty string is almost certainly a dummy being initialized by UiBinder before the data is available to render into the widgets. Delay allocation of the movie DOM as the movie just has to be rebuilt later when the real text is supplied by the UI code. Change-Id: Ifcefbb8bba3d9befa60c608c4457135ada0821b4
This commit is contained in:
parent
8df6e691f9
commit
dc3ce8e2dd
@ -130,7 +130,7 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
}
|
||||
|
||||
private void embedMovie() {
|
||||
if (flashEnabled && UserAgent.hasFlash) {
|
||||
if (flashEnabled && UserAgent.hasFlash && text.length() > 0) {
|
||||
final String flashVars = "text=" + URL.encodeQueryString(getText());
|
||||
final SafeHtmlBuilder h = new SafeHtmlBuilder();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user