aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-10-19 17:42:10 +0300
committerArtur Signell <artur@vaadin.com>2012-11-08 15:29:44 +0200
commit08dbd4739c27bc6ac1eb3e5d655fbcfd3a8dfdd7 (patch)
treee6a7983adda7cf1352cedbff01243f6c1bbc181f /client
parent06efa74eafcf78e3654c60bd5c14bb97bed2b13d (diff)
downloadvaadin-framework-08dbd4739c27bc6ac1eb3e5d655fbcfd3a8dfdd7.tar.gz
vaadin-framework-08dbd4739c27bc6ac1eb3e5d655fbcfd3a8dfdd7.zip
Handle the situation where browser reports an unknown button on click event (#9956)
Change-Id: Ia6b1ebf42734d546cbba4e5e845d4c9998cdf9f7
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/MouseEventDetailsBuilder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/MouseEventDetailsBuilder.java b/client/src/com/vaadin/client/MouseEventDetailsBuilder.java
index cda2eec07f..85acf5000a 100644
--- a/client/src/com/vaadin/client/MouseEventDetailsBuilder.java
+++ b/client/src/com/vaadin/client/MouseEventDetailsBuilder.java
@@ -65,6 +65,9 @@ public class MouseEventDetailsBuilder {
mouseEventDetails.setButton(MouseButton.RIGHT);
} else if (evt.getButton() == NativeEvent.BUTTON_MIDDLE) {
mouseEventDetails.setButton(MouseButton.MIDDLE);
+ } else {
+ // IE8 does not always report a button. Assume left.
+ mouseEventDetails.setButton(MouseButton.LEFT);
}
mouseEventDetails.setAltKey(evt.getAltKey());
mouseEventDetails.setCtrlKey(evt.getCtrlKey());