diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-15 22:03:26 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-12-15 23:12:34 +0200 |
commit | bac6b9599bce821d3cb554aa4ccb729e956493ee (patch) | |
tree | 8e50d85a8ca44b610c0a58c210e90b6a2f7700ca /server/src/com/vaadin | |
parent | 10b30728e94ecfc19208dc387f5dbd7b9b6f71b1 (diff) | |
download | vaadin-framework-bac6b9599bce821d3cb554aa4ccb729e956493ee.tar.gz vaadin-framework-bac6b9599bce821d3cb554aa4ccb729e956493ee.zip |
Do not write empty icon-alt or icon-alternate-text (#7749)
Change-Id: Idca7206667ca4c37f8b5bfe8f3344c751624e526
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r-- | server/src/com/vaadin/ui/Button.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java index 7063568f26..db78b04a28 100644 --- a/server/src/com/vaadin/ui/Button.java +++ b/server/src/com/vaadin/ui/Button.java @@ -689,8 +689,10 @@ public class Button extends AbstractComponent implements if (plain == null || !plain) { setHtmlContentAllowed(true); } - setIconAlternateText(DesignAttributeHandler.readAttribute("icon-alt", - attr, String.class)); + if (attr.hasKey("icon-alt")) { + setIconAlternateText(DesignAttributeHandler.readAttribute( + "icon-alt", attr, String.class)); + } // click-shortcut removeClickShortcut(); ShortcutAction action = DesignAttributeHandler.readAttribute( @@ -712,6 +714,7 @@ public class Button extends AbstractComponent implements result.add(DESIGN_ATTR_PLAIN_TEXT); result.add("caption"); result.add("icon-alt"); + result.add("icon-alternate-text"); result.add("click-shortcut"); result.add("html-content-allowed"); return result; |