summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-14 12:48:07 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-14 12:48:07 +0200
commit0628eea037ebb9f47ad77f37c59145082fc2e74c (patch)
treeb9ed441c79ba1e4acad13aa70ffdb4379cac5ea9 /src
parentecd80181d160b58a281eb92fabaa2a10ea0adac2 (diff)
parent36f749b4f83086a5306726ad607c9bb3a0fa7526 (diff)
downloadvaadin-framework-0628eea037ebb9f47ad77f37c59145082fc2e74c.tar.gz
vaadin-framework-0628eea037ebb9f47ad77f37c59145082fc2e74c.zip
Merge remote branch 'origin/6.8'
Conflicts: WebContent/release-notes.html tests/test.xml tests/testbench/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml7
-rw-r--r--src/com/vaadin/terminal/gwt/client/BrowserInfo.java12
-rw-r--r--src/com/vaadin/terminal/gwt/client/Util.java1
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java5
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java5
5 files changed, 24 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml
index 9bc05dee2e..3d66bab0a3 100644
--- a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml
+++ b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml
@@ -50,6 +50,13 @@
</any>
</replace-with>
+ <!-- Fall through to this rule for everything but IE -->
+ <replace-with
+ class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper">
+ <when-type-is
+ class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" />
+ </replace-with>
+
<replace-with
class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapperIE">
<when-type-is
diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
index e5006f4a9c..330e4cf5de 100644
--- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
+++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
@@ -64,13 +64,23 @@ public class BrowserInfo {
browserDetails.setIEMode(documentMode);
}
}
- touchDevice = detectTouchDevice();
+
+ if (browserDetails.isChrome()) {
+ touchDevice = detectChromeTouchDevice();
+ } else {
+ touchDevice = detectTouchDevice();
+ }
}
private native boolean detectTouchDevice()
/*-{
try { document.createEvent("TouchEvent");return true;} catch(e){return false;};
}-*/;
+
+ private native boolean detectChromeTouchDevice()
+ /*-{
+ return ("ontouchstart" in window);
+ }-*/;
private native int getIEDocumentMode()
/*-{
diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java
index fc4d56931c..11122b1b0b 100644
--- a/src/com/vaadin/terminal/gwt/client/Util.java
+++ b/src/com/vaadin/terminal/gwt/client/Util.java
@@ -1216,7 +1216,6 @@ public class Util {
* button, false otherwise
*/
public static boolean isTouchEventOrLeftMouseButton(Event event) {
- int eventType = event.getTypeInt();
boolean touchEvent = Util.isTouchEvent(event);
return touchEvent || event.getButton() == Event.BUTTON_LEFT;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java
index 320520cb39..c439163595 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java
@@ -71,7 +71,10 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements
public void onBrowserEvent(Event event) {
if (icon != null && (event.getTypeInt() == Event.ONCLICK)
&& (DOM.eventGetTarget(event) == icon.getElement())) {
- setValue(!getValue());
+ // Click on icon should do nothing if widget is disabled
+ if (isEnabled()) {
+ setValue(!getValue());
+ }
}
super.onBrowserEvent(event);
if (event.getTypeInt() == Event.ONLOAD) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index b84fc1312f..a41fbe3ef9 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -274,9 +274,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
int endOfFirstRange = row.getIndex() - 1;
if (!(endOfFirstRange - startRow.getIndex() < 0)) {
// create range of first part unless its length is < 1
- VScrollTableRow endOfRange = scrollBody
- .getRowByRowIndex(endOfFirstRange);
- ranges.add(new SelectionRange(startRow, endOfRange));
+ ranges.add(new SelectionRange(startRow, endOfFirstRange
+ - startRow.getIndex() + 1));
}
int startOfSecondRange = row.getIndex() + 1;
if (!(getEndIndex() - startOfSecondRange < 0)) {