diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-08-06 14:48:02 +0000 |
---|---|---|
committer | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-08-06 14:48:02 +0000 |
commit | 763f77fc2f3b3c3c1ce2fa91ae2a8097b11f6b6b (patch) | |
tree | 9824c11b76db8bf7e31229ba30d2c2f252171839 /src | |
parent | 049bb369b9215c15cb4de528c6877a61d41e493c (diff) | |
download | vaadin-framework-763f77fc2f3b3c3c1ce2fa91ae2a8097b11f6b6b.tar.gz vaadin-framework-763f77fc2f3b3c3c1ce2fa91ae2a8097b11f6b6b.zip |
Fix and test for #9136 (Tree throws wrong ItemClickEvent in IE9)
svn changeset:24087/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VTree.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java index 1d5ec206aa..2d318522ea 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java @@ -753,6 +753,10 @@ public class VTree extends FocusElementPanel implements Paintable, if (BrowserInfo.get().isWebkit() && !treeHasFocus) { /* * Safari may need to wait for focus. See FocusImplSafari. + * + * Note that this if/else must exactly match the one in + * fireClick() to ensure that the above click/selection event + * logic works correctly (#9136) */ // VConsole.log("Deferring click handling to let webkit gain focus..."); Scheduler.get().scheduleDeferred(command); @@ -930,13 +934,17 @@ public class VTree extends FocusElementPanel implements Paintable, details.toString(), sendClickEventNow); } }; - if (treeHasFocus) { - command.execute(); - } else { + if (BrowserInfo.get().isWebkit() && !treeHasFocus) { /* * Webkits need a deferring due to FocusImplSafari uses timeout + * + * Note that this if/else must exactly match the one in + * handleClickSelection() to ensure that the above + * click/selection event logic works correctly (#9136) */ Scheduler.get().scheduleDeferred(command); + } else { + command.execute(); } } |