diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-02-05 13:23:16 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-02-05 13:23:16 +0000 |
commit | 6f70b60b411c229fe6a5b42c9d3b9a880a6f3ef3 (patch) | |
tree | 9a22e7048849211f2150f064e009cf38072b4694 /client | |
parent | bad395ea803cf6f81ca37ff6aebdc25144859227 (diff) | |
parent | f962b50de91c33e8f7b9d2f7ef467511af9647f2 (diff) | |
download | vaadin-framework-6f70b60b411c229fe6a5b42c9d3b9a880a6f3ef3.tar.gz vaadin-framework-6f70b60b411c229fe6a5b42c9d3b9a880a6f3ef3.zip |
Merge "Merge of (#10464) to Vaadin 7." into 7.0
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/FocusableScrollPanel.java | 8 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/FocusableScrollPanel.java b/client/src/com/vaadin/client/ui/FocusableScrollPanel.java index a1d2ad6ccc..01d39392af 100644 --- a/client/src/com/vaadin/client/ui/FocusableScrollPanel.java +++ b/client/src/com/vaadin/client/ui/FocusableScrollPanel.java @@ -192,4 +192,12 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements }); } + public Element getFocusElement() { + if (useFakeFocusElement()) { + return focusElement.cast(); + } else { + return getElement(); + } + } + } diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 9ac9532ae4..b9244a1e91 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -6924,11 +6924,19 @@ public class VScrollTable extends FlowPanel implements HasWidgets, navKeyDown = false; if (BrowserInfo.get().isIE()) { - // IE sometimes moves focus to a clicked table cell... + /* + * IE sometimes moves focus to a clicked table cell... (#7965) + * ...and sometimes it sends blur events even though the focus + * handler is still active. (#10464) + */ Element focusedElement = Util.getIEFocusedElement(); - if (Util.getConnectorForElement(client, getParent(), focusedElement) == this) { - // ..in that case, steal the focus back to the focus handler - // but not if focus is in a child component instead (#7965) + if (Util.getConnectorForElement(client, getParent(), focusedElement) == this + && focusedElement != null + && focusedElement != scrollBodyPanel.getFocusElement()) { + /* + * Steal focus back to the focus handler if it was moved to some + * other part of the table. Avoid stealing focus in other cases. + */ focus(); return; } |