summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2014-05-04 17:12:54 +0300
committerTeemu Pòˆntelin <teemu@vaadin.com>2014-05-04 17:12:54 +0300
commit2efe580cb8dbd185fc154a7c7d6acb7efc4f16d5 (patch)
treef35587e4c53f3e02cbc384998d50d3e1ddb0b395 /client
parent9c1501a5d341082f61398b8e1e6bde4aa7826d7a (diff)
downloadvaadin-framework-2efe580cb8dbd185fc154a7c7d6acb7efc4f16d5.tar.gz
vaadin-framework-2efe580cb8dbd185fc154a7c7d6acb7efc4f16d5.zip
Fast-forward DateField only with left mouse button (#8012)
Change-Id: Ib21c650feeed1ca584b2aeefb6c694e73e12b90d
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VCalendarPanel.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java
index 74462e501d..0725e15f66 100644
--- a/client/src/com/vaadin/client/ui/VCalendarPanel.java
+++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java
@@ -22,6 +22,7 @@ import java.util.Iterator;
import com.google.gwt.aria.client.Roles;
import com.google.gwt.aria.client.SelectedValue;
import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.dom.client.Node;
import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
@@ -1498,11 +1499,12 @@ public class VCalendarPanel extends FocusableFlexTable implements
*/
@Override
public void onMouseDown(MouseDownEvent event) {
- // Allow user to click-n-hold for fast-forward or fast-rewind.
+ // Click-n-hold the left mouse button for fast-forward or fast-rewind.
// Timer is first used for a 500ms delay after mousedown. After that has
// elapsed, another timer is triggered to go off every 150ms. Both
// timers are cancelled on mouseup or mouseout.
- if (event.getSource() instanceof VEventButton) {
+ if (event.getNativeButton() == NativeEvent.BUTTON_LEFT
+ && event.getSource() instanceof VEventButton) {
final VEventButton sender = (VEventButton) event.getSource();
processClickEvent(sender);
mouseTimer = new Timer() {