aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-02-10 15:57:20 +0200
committerArtur Signell <artur@vaadin.com>2014-02-10 16:30:10 +0200
commit76ea26732bcc85da57c89efcacb6919cab573302 (patch)
tree75ec6620ca279d92030139656a30905829b42c89
parent2c1f8e67a71ad1163dd5b87f070987a05dfe35c5 (diff)
downloadvaadin-framework-76ea26732bcc85da57c89efcacb6919cab573302.tar.gz
vaadin-framework-76ea26732bcc85da57c89efcacb6919cab573302.zip
Fix caption lost issue related to focus changing (#12967)
Change-Id: I2c3843c078e72dc1f394b28ea7669cc232e1e739
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/Slot.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
index 37a97f3399..efa19895a8 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
@@ -474,7 +474,8 @@ public final class Slot extends SimplePanel {
// Made changes to DOM. Focus can be lost if it was in the
// widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget
+ .getElement().isOrHasChild(focusedElement));
}
} else if (caption != null) {
orphan(widget);
@@ -485,7 +486,8 @@ public final class Slot extends SimplePanel {
captionWrap = null;
// Made changes to DOM. Focus can be lost if it was in the widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget.getElement()
+ .isOrHasChild(focusedElement));
}
// Caption text